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')
|
---|
14 | sources = glob.glob("external-alma/atnf/pks/pks_maths.cc")
|
---|
15 | sources += glob.glob("external-alma/atnf/PKSIO/*.cc")
|
---|
16 |
|
---|
17 | sources = glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.cc")
|
---|
18 |
|
---|
19 | headers = glob.glob('src/*.h')
|
---|
20 | headers += glob.glob("external-alma/atnf/PKSIO/*.h")
|
---|
21 | headers += glob.glob("external-alma/atnf/pks/pks_maths.h")
|
---|
22 | headers += glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.h")
|
---|
23 |
|
---|
24 | incdirs = ["external-alma"]
|
---|
25 | incdirs += ["external/libpyrap/pyrap-0.3.2"]
|
---|
26 |
|
---|
27 | defines = [('HAVE_LIBPYRAP', None), ("AIPS_USENUMPY", None),
|
---|
28 | ('WCSLIB_GETWCSTAB', None)]
|
---|
29 |
|
---|
30 | casalibs = ['casa_images', 'casa_ms', 'casa_components', 'casa_coordinates',
|
---|
31 | 'casa_fits', 'casa_lattices', 'casa_measures',
|
---|
32 | 'casa_scimath', 'casa_scimath_f', 'casa_tables', 'casa_mirlib']
|
---|
33 |
|
---|
34 | # casa_casa is added by default
|
---|
35 |
|
---|
36 | asapextension = Extension(name="%s.%s" % (PKGNAME, EXTNAME),
|
---|
37 | sources = sources,
|
---|
38 | depends = headers,
|
---|
39 | libraries= casalibs,
|
---|
40 | define_macros = defines,
|
---|
41 | include_dirs = incdirs)
|
---|
42 |
|
---|
43 |
|
---|
44 | setup(name = PKGNAME,
|
---|
45 | version = '4.1.x-trunk',
|
---|
46 | description = 'ATNF Spectral-line Analysis Package',
|
---|
47 | author = 'Malte Marquarding',
|
---|
48 | author_email = 'Malte.Marquarding@csiro.au',
|
---|
49 | url = 'http://svn.atnf.csiro.au/trac/asap',
|
---|
50 | keywords = ['radio astronomy', 'spectral-line', 'ATNF'],
|
---|
51 | long_description = '''A package to process and analyse spectral-line
|
---|
52 | data from (ATNF) single-dish telescopes.
|
---|
53 | ''',
|
---|
54 | package_dir = {'asap': 'python'},
|
---|
55 | packages = ['asap'],
|
---|
56 | package_data = {"": ["data/ipy*"], },
|
---|
57 | scripts = ["bin/asap", "bin/asap_update_data",],
|
---|
58 | license = 'GPL',
|
---|
59 | ext_modules =[ asapextension ],
|
---|
60 | cmdclass={'build_ext': casacorebuild_ext})
|
---|
61 |
|
---|