~ubuntu-branches/ubuntu/raring/python-scipy/raring-proposed

« back to all changes in this revision

Viewing changes to Lib/special/setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
import os
 
4
from os.path import join
 
5
 
 
6
def configuration(parent_package='',top_path=None):
 
7
    from numpy.distutils.misc_util import Configuration
 
8
    config = Configuration('special', parent_package, top_path)
 
9
 
 
10
    define_macros = []
 
11
#    if sys.platform=='win32':
 
12
#        define_macros.append(('NOINFINITIES',None))
 
13
#        define_macros.append(('NONANS',None))
 
14
 
 
15
    # C libraries
 
16
    config.add_library('c_misc',sources=[join('c_misc','*.c')])
 
17
    config.add_library('cephes',sources=[join('cephes','*.c')],
 
18
                       macros=define_macros)
 
19
 
 
20
    # Fortran libraries
 
21
    config.add_library('mach',sources=[join('mach','*.f')],
 
22
                       config_fc={'noopt':(__file__,1)})
 
23
    config.add_library('toms',sources=[join('amos','*.f')])
 
24
    config.add_library('amos',sources=[join('toms','*.f')])
 
25
    config.add_library('cdf',sources=[join('cdflib','*.f')])
 
26
    config.add_library('specfun',sources=[join('specfun','*.f')])
 
27
 
 
28
    # Extension _cephes
 
29
    sources = ['_cephesmodule.c', 'amos_wrappers.c', 'specfun_wrappers.c',
 
30
               'toms_wrappers.c','cdf_wrappers.c','ufunc_extras.c']
 
31
    config.add_extension('_cephes', sources=sources,
 
32
                         libraries=['amos','toms','c_misc','cephes','mach',
 
33
                                    'cdf', 'specfun'],
 
34
                         define_macros = define_macros
 
35
                         )
 
36
    # Extension specfun
 
37
 
 
38
    config.add_extension('specfun',
 
39
                         sources=['specfun.pyf'],
 
40
                         f2py_options=['--no-wrap-functions'],
 
41
                         define_macros=[],
 
42
                         libraries=['specfun'])
 
43
 
 
44
    config.add_data_dir('tests')
 
45
 
 
46
    return config
 
47
 
 
48
if __name__ == '__main__':
 
49
    from numpy.distutils.core import setup
 
50
    setup(**configuration(top_path='').todict())