source: trunk/distutils/setup.py@ 2490

Last change on this file since 2490 was 2490, checked in by Malte Marquarding, 13 years ago

transitional directory for build files as a distutils based python package. The contents will move to the top dir and scons will be removed.

File size: 2.1 KB
Line 
1import glob
2try:
3 from setuptools import setup
4except ImportError, ex:
5 from distutils.core import setup
6from distutils.core import Extension
7from setupext import casacorebuild_ext
8from distutils import ccompiler
9
10PKGNAME = "asap"
11EXTNAME = "_asap"
12
13sources = glob.glob('src/*.cpp')
14sources = glob.glob("external-alma/atnf/pks/pks_maths.cc")
15sources += glob.glob("external-alma/atnf/PKSIO/*.cc")
16
17sources = glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.cc")
18
19headers = glob.glob('src/*.h')
20headers += glob.glob("external-alma/atnf/PKSIO/*.h")
21headers += glob.glob("external-alma/atnf/pks/pks_maths.h")
22headers += glob.glob("external/libpyrap/pyrap-0.3.2/pyrap/Converters/*.h")
23
24incdirs = ["external-alma"]
25incdirs += ["external/libpyrap/pyrap-0.3.2"]
26
27defines = [('HAVE_LIBPYRAP', None), ("AIPS_USENUMPY", None),
28 ('WCSLIB_GETWCSTAB', None)]
29
30casalibs = ['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
36asapextension = 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
44setup(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
52data 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
Note: See TracBrowser for help on using the repository browser.