comparison setup.py @ 2213:3c38d9be63a6

check MANIFEST against the files actually unpacked
author Richard Jones <richard@users.sourceforge.net>
date Fri, 16 Apr 2004 10:43:51 +0000
parents 44f3c1dd636b
children 39ffc2a7d901
comparison
equal deleted inserted replaced
2212:75e46660345c 2213:3c38d9be63a6
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: setup.py,v 1.59 2004-03-24 05:56:06 richard Exp $ 19 # $Id: setup.py,v 1.60 2004-04-16 10:43:51 richard Exp $
20 20
21 from distutils.core import setup, Extension 21 from distutils.core import setup, Extension
22 from distutils.util import get_platform 22 from distutils.util import get_platform
23 from distutils.command.build_scripts import build_scripts 23 from distutils.command.build_scripts import build_scripts
24 24
126 script = string.replace(script, '_', '-') 126 script = string.replace(script, '_', '-')
127 if sys.platform == "win32": 127 if sys.platform == "win32":
128 script = script + ".bat" 128 script = script + ".bat"
129 return script 129 return script
130 130
131 def check_manifest():
132 """Check that the files listed in the MANIFEST are present when the
133 source is unpacked.
134 """
135 try:
136 f = open('MANIFEST')
137 except:
138 print '\n*** SOURCE ERROR: The MANIFEST file is missing!'
139 sys.exit(1)
140 try:
141 manifest = [l.strip() for l in f.readlines()]
142 finally:
143 f.close()
144 err = [line for line in manifest if not os.path.exists(line)]
145 if err:
146 n = len(manifest)
147 print '\n*** SOURCE ERROR: There are files missing (%d/%d found)!'%(
148 n-len(err), n)
149 sys.exit(1)
131 150
132 151
133 ############################################################################# 152 #############################################################################
134 ### Main setup stuff 153 ### Main setup stuff
135 ############################################################################# 154 #############################################################################

Roundup Issue Tracker: http://roundup-tracker.org/