[2490] | 1 | import glob
|
---|
| 2 | try:
|
---|
| 3 | from setuptools import setup
|
---|
| 4 | except ImportError, ex:
|
---|
| 5 | from distutils.core import setup
|
---|
| 6 | from distutils.core import Extension
|
---|
| 7 | from setupext import casacorebuild_ext
|
---|
| 8 | from distutils import ccompiler
|
---|
| 9 |
|
---|
| 10 | PKGNAME = "asap"
|
---|
| 11 | EXTNAME = "_asap"
|
---|
| 12 |
|
---|
| 13 | sources = glob.glob('src/*.cpp')
|
---|
[2492] | 14 | sources += glob.glob("external-alma/atnf/pks/pks_maths.cc")
|
---|
[2490] | 15 | sources += glob.glob("external-alma/atnf/PKSIO/*.cc")
|
---|
[2492] | 16 | sources += glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.cc")
|
---|
[2490] | 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 |
|
---|
| 42 |
|
---|
| 43 | setup(name = PKGNAME,
|
---|
| 44 | version = '4.1.x-trunk',
|
---|
| 45 | description = 'ATNF Spectral-line Analysis Package',
|
---|
| 46 | author = 'Malte Marquarding',
|
---|
| 47 | author_email = 'Malte.Marquarding@csiro.au',
|
---|
| 48 | url = 'http://svn.atnf.csiro.au/trac/asap',
|
---|
| 49 | keywords = ['radio astronomy', 'spectral-line', 'ATNF'],
|
---|
| 50 | long_description = '''A package to process and analyse spectral-line
|
---|
| 51 | data from (ATNF) single-dish telescopes.
|
---|
| 52 | ''',
|
---|
| 53 | package_dir = {'asap': 'python'},
|
---|
| 54 | packages = ['asap'],
|
---|
| 55 | package_data = {"": ["data/ipy*"], },
|
---|
| 56 | scripts = ["bin/asap", "bin/asap_update_data",],
|
---|
| 57 | license = 'GPL',
|
---|
| 58 | ext_modules =[ asapextension ],
|
---|
| 59 | cmdclass={'build_ext': casacorebuild_ext})
|
---|
| 60 |
|
---|