Changeset 2517 for trunk/scons_ext.py


Ignore:
Timestamp:
05/15/12 15:17:10 (12 years ago)
Author:
Malte Marquarding
Message:

More updates to get a distutils/scons build going

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/scons_ext.py

    r2515 r2517  
    1919              'Prefix for cfitsio installation location'),
    2020             ('cfitsiolib=', None, 'Name of the cfitsio library'),
     21             ('cfitsioincdir=', None, 'The custom cfitsio include dir'),
    2122             ('wcsroot=', None, 'Prefix for wcslib installation location'),
    2223             ('wcslib=', None, 'Name of the wcs library'),
     
    4950        self.cfitsioroot = None
    5051        self.cfitsiolib = None
     52        self.cfitsioincdir = None
    5153        self.wcsroot = None
    5254        self.wcslib = None
     
    6062        build_ext.build_ext.finalize_options(self)
    6163        for opt in self.user_options:
    62             atr = opt[0].strip("=")
    63             v = getattr(self, atr)
     64            attr = opt[0].strip("=")
     65            v = getattr(self, attr)
    6466            if v is not None:
    6567                if opt[1] is None:
    66                     self._scons_options.append("=".join([atr, v]))
     68                    self._scons_options.append("=".join([attr, v]))
    6769                else:
    6870                    self._scons_options.append(" ".join(["-"+opt[1], v]))
     
    7981            os.makedirs(extdir)
    8082        cmd = ['scons'] + self._scons_options
    81         subprocess.call(cmd)
     83        retcode = subprocess.call(cmd)
     84        if retcode != 0:
     85            raise RuntimeError('scons failed')
    8286        # copy extension into distutils build directory
    8387        if os.path.exists("build/_asap.so"):
Note: See TracChangeset for help on using the changeset viewer.