comparison setup.py @ 226:5c5913b889bc

Fix setup.py...
author Thibaut Girka <thib@sitedethib.com>
date Mon, 19 Dec 2011 22:18:11 +0100
parents 091301805cce
children 8f4cd1c01d22
comparison
equal deleted inserted replaced
225:2d35565b5608 226:5c5913b889bc
18 18
19 19
20 # The installed script shouldn't call pyximport, strip references to it 20 # The installed script shouldn't call pyximport, strip references to it
21 class BuildScripts(build_scripts): 21 class BuildScripts(build_scripts):
22 def copy_scripts(self): 22 def copy_scripts(self):
23 self.mkpath('scripts')
23 for script in (os.path.basename(script) for script in self.scripts): 24 for script in (os.path.basename(script) for script in self.scripts):
24 outfile = os.path.join('scripts', script) 25 outfile = os.path.join('scripts', script)
25 if not self.force and not newer(script, outfile): 26 if not self.force and not newer(script, outfile):
26 log.debug("not copying %s (up-to-date)", script) 27 log.debug("not copying %s (up-to-date)", script)
27 elif not self.dry_run: 28 elif not self.dry_run:
28 with open(script, 'r') as file, open(outfile, 'w') as out: 29 with open(script, 'r') as file, open(outfile, 'w') as out:
29 for line in file: 30 for line in file:
30 if not 'pyximport' in line: 31 if not 'pyximport' in line:
31 out.write(line) 32 out.write(line)
32 33
33 orig_build_scripts.copy_scripts(self) 34 build_scripts.copy_scripts(self)
34 35
35 36
36 packages = [] 37 packages = []
37 extensions = [] 38 extensions = []
38 39