Changeset 2525 for trunk/setup_ext


Ignore:
Timestamp:
05/16/12 09:23:15 (12 years ago)
Author:
Malte Marquarding
Message:

make extension into module to hide from setup.py

Location:
trunk/setup_ext
Files:
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/setup_ext/__init__.py

    r2517 r2525  
    11import os, sys, platform
    22import subprocess
     3import glob
    34import shutil
    45from distutils.command import build_ext
     6
     7try:
     8    from setuptools import setup as _setup
     9    from setuptools import Extension
     10except ImportError, ex:
     11    from distutils.core import setup as _setup
     12    from distutils.core import Extension
     13
     14def setup(*args, **kwargs):
     15    asapso = Extension(name="%s._%s".format(kwargs['name'],kwargs['name']),
     16                                            sources=[])
     17    d = {'ext_modules': [ asapso ],
     18         'cmdclass': {'build_ext': scons_ext}
     19         }
     20    kwargs.update(d)
     21    print kwargs
     22    _setup(*args, **kwargs)
     23   
    524
    625class scons_ext(build_ext.build_ext):
     
    2847             ('f2clib=', None, 'Name of the fortran-to-c library'),
    2948             ('jobs=','j', 'Number of processes'),
     49             ('extraflags=', None,
     50              'Extra build flags e.g. static libs, defines etc.'),
    3051             ('extraroot=', None,
    3152              'Extra root directory where muiltple packages could be found,'
     
    4465        self.jobs = None
    4566        self.extraroot = None
     67        self.extraflags = None
    4668        self.casacoreroot = None
    4769        self.casacorestatic = None
Note: See TracChangeset for help on using the changeset viewer.