Changeset 2509 for trunk/distutils/scons_ext.py
- Timestamp:
- 05/14/12 14:10:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/distutils/scons_ext.py
r2504 r2509 21 21 ('rpfitsroot=', None, 'Prefix for rpfits installation location'), 22 22 ('rpfitslib=', None, 'Name of the rpfits library'), 23 ('blaslib=', None, 'Name of the blas library'), 24 ('lapacklib=', None, 'Name of the lapack library'), 25 ('f2clib=', None, 'Name of the fortran-to-c library'), 23 26 ('jobs=','j', 'Number of processes'), 24 27 ('extraroot=', None, … … 47 50 self.rpfitsroot = None 48 51 self.rpfitslib = None 52 self.blaslib = None 53 self.lapacklib = None 54 self.f2clib = None 49 55 50 56 def finalize_options(self): … … 60 66 61 67 def build_extensions(self): 62 ext = self.extensions[0] 63 ext_path = self.get_ext_fullpath(ext.name) 64 extdir = os.path.dirname(ext_path) 68 ext = self.extensions[0] 69 try: 70 ext_path = self.get_ext_fullpath(ext.name) 71 extdir = os.path.dirname(ext_path) 72 except AttributeError: 73 # hack for pyhton 2.5 74 extdir = os.path.join(self.build_lib, ext.name.split(".")[0]) 65 75 if not os.path.exists(extdir): 66 76 os.makedirs(extdir) 67 cmd = ['scons' , '--quiet'] + self._scons_options77 cmd = ['scons'] + self._scons_options 68 78 subprocess.call(cmd) 79 # copy extension into distutils build directory 69 80 if os.path.exists("build/_asap.so"): 70 shutil.copy("build/_asap.so", ext _path)81 shutil.copy("build/_asap.so", extdir)
Note: See TracChangeset
for help on using the changeset viewer.