Changeset 2504 for trunk


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

handle extension build in scons

Location:
trunk/distutils
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/distutils/setup.py

    r2492 r2504  
    55    from distutils.core import setup
    66from distutils.core import Extension
    7 from setupext import casacorebuild_ext
     7from scons_ect import scons_ext
    88from distutils import ccompiler
    99
    1010PKGNAME = "asap"
    11 EXTNAME = "_asap"
    12 
    13 sources = glob.glob('src/*.cpp')
    14 sources += glob.glob("external-alma/atnf/pks/pks_maths.cc")
    15 sources += glob.glob("external-alma/atnf/PKSIO/*.cc")
    16 sources += glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.cc")
    17 
    18 headers = glob.glob('src/*.h')
    19 headers += glob.glob("external-alma/atnf/PKSIO/*.h")
    20 headers += glob.glob("external-alma/atnf/pks/pks_maths.h")
    21 headers += glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.h")
    22 
    23 incdirs = ["external-alma"]
    24 incdirs += ["external/libpyrap/pyrap-0.3.2"]
    25 
    26 defines = [('HAVE_LIBPYRAP', None), ("AIPS_USENUMPY", None),
    27            ('WCSLIB_GETWCSTAB', None)]
    28 
    29 casalibs = ['casa_images', 'casa_ms', 'casa_components', 'casa_coordinates',
    30             'casa_fits', 'casa_lattices', 'casa_measures',
    31             'casa_scimath', 'casa_scimath_f', 'casa_tables', 'casa_mirlib']
    32 
    33 # casa_casa is added by default
    34 
    35 asapextension = Extension(name="%s.%s" % (PKGNAME, EXTNAME),
    36                           sources = sources,
    37                           depends = headers,
    38                           libraries= casalibs,
    39                           define_macros = defines,
    40                           include_dirs = incdirs)
    41 
     11asapso = Extension(name="%s._%s" % (PKGNAME, PKGNAME), sources=[])
    4212
    4313setup(name = PKGNAME,
     
    5121data from (ATNF) single-dish telescopes.
    5222''',
    53       package_dir = {'asap': 'python'},
    54       packages = ['asap'],
    55       package_data = {"": ["data/ipy*"], },
     23      package_dir = { PKGNAME: 'python' },
     24      packages = [ PKGNAME ],
    5625      scripts = ["bin/asap", "bin/asap_update_data",],
    5726      license = 'GPL',
    58       ext_modules =[ asapextension ],
    59       cmdclass={'build_ext': casacorebuild_ext})
    60      
     27      install_requires = ["ipython>=0.11", "matplotlib>=0.99", "numpy>=1.3"],
     28      setup_requires = [ "scons>=1.0" ],
     29      ext_modules =[ asapso ],
     30      cmdclass={'build_ext': scons_ext}
     31
     32      )
Note: See TracChangeset for help on using the changeset viewer.