Changeset 2509 for trunk/distutils


Ignore:
Timestamp:
05/14/12 14:10:43 (13 years ago)
Author:
Malte Marquarding
Message:

Fix python2.5 build and add extra options from scons

Location:
trunk/distutils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/distutils/scons_ext.py

    r2504 r2509  
    2121             ('rpfitsroot=', None, 'Prefix for rpfits installation location'),
    2222             ('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'),
    2326             ('jobs=','j', 'Number of processes'),
    2427             ('extraroot=', None,
     
    4750        self.rpfitsroot = None
    4851        self.rpfitslib = None
     52        self.blaslib = None
     53        self.lapacklib = None
     54        self.f2clib = None
    4955
    5056    def finalize_options(self):
     
    6066
    6167    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])
    6575        if not os.path.exists(extdir):
    6676            os.makedirs(extdir)
    67         cmd = ['scons', '--quiet'] + self._scons_options
     77        cmd = ['scons'] + self._scons_options
    6878        subprocess.call(cmd)
     79        # copy extension into distutils build directory
    6980        if os.path.exists("build/_asap.so"):
    70             shutil.copy("build/_asap.so", ext_path)
     81            shutil.copy("build/_asap.so", extdir)
  • trunk/distutils/setup.cfg

    r2490 r2509  
    66# wcslib=/usr/local/lib/libwcs-4.13.2.a
    77
    8 #casacore = /usr/local
    9 #boost-root = /usr
     8# extra root directory to search for other packages
     9#extraroot =
     10
     11#casacoreroot = /usr/local
     12#boostroot = /usr
    1013#boostlib = boost_python
    11 #cfitsio-root = /usr
     14#cfitsioroot = /usr
    1215#cfitsiolib = cfitsio
    13 #wcs-root = /usr/local
     16#wcsroot = /usr/local
    1417#wcslib = wcs
    15 #rpfits-root = /usr/local
     18#rpfitsroot = /usr/local
    1619#rpfitslib = rpfits
     20#blaslib = blas
     21#lapacklib = lapack
     22#f2clib = gfortran
    1723
    18 #extra-root =
    19 
Note: See TracChangeset for help on using the changeset viewer.