File: setup.py

package info (click to toggle)
python-scipy 0.10.1%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 42,232 kB
  • sloc: cpp: 224,773; ansic: 103,496; python: 85,210; fortran: 79,130; makefile: 272; sh: 43
file content (54 lines) | stat: -rwxr-xr-x 1,998 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python

from os.path import join

def configuration(parent_package = '', top_path = None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from numpy.distutils.system_info import get_info
    from distutils.sysconfig import get_python_inc

    config = Configuration('spatial', parent_package, top_path)

    config.add_data_dir('tests')

    qhull_src = ['geom2.c', 'geom.c', 'global.c', 'io.c', 'libqhull.c',
                 'mem.c', 'merge.c', 'poly2.c', 'poly.c', 'qset.c',
                 'random.c', 'rboxlib.c', 'stat.c', 'user.c', 'usermem.c',
                 'userprintf.c']

    config.add_library('qhull',
                       sources=[join('qhull', 'src', x) for x in qhull_src],
                       include_dirs=[get_python_inc(),
                                     get_numpy_include_dirs()],
                       # XXX: GCC dependency!
                       #extra_compiler_args=['-fno-strict-aliasing'],
                       )

    lapack = dict(get_info('lapack_opt'))
    try:
        libs = ['qhull'] + lapack.pop('libraries')
    except KeyError:
        libs = ['qhull']
    config.add_extension('qhull',
                         sources=['qhull.c'],
                         libraries=libs,
                         **lapack)

    config.add_extension('ckdtree', sources=['ckdtree.c']) # FIXME: cython

    config.add_extension('_distance_wrap',
        sources=[join('src', 'distance_wrap.c'), join('src', 'distance.c')],
        include_dirs = [get_numpy_include_dirs()])

    return config

if __name__ == '__main__':
    from numpy.distutils.core import setup
    setup(maintainer = "SciPy Developers",
          author = "Anne Archibald",
          maintainer_email = "scipy-dev@scipy.org",
          description = "Spatial algorithms and data structures",
          url = "http://www.scipy.org",
          license = "SciPy License (BSD Style)",
          **configuration(top_path='').todict()
          )