~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to scipy/sandbox/models/setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
def configuration(parent_package='',top_path=None, package_name='models'):
 
3
    from numpy.distutils.misc_util import Configuration
 
4
    config = Configuration(package_name,parent_package,top_path)
 
5
 
 
6
    config.add_subpackage('*')
 
7
 
 
8
    config.add_data_dir('tests')
 
9
 
 
10
    try:
 
11
        import sys
 
12
        from scipy.sandbox.models.bspline_module import mod
 
13
        n, s, d = weave_ext(mod)
 
14
        config.add_extension(n, s, **d)
 
15
    except ImportError: pass
 
16
 
 
17
    return config
 
18
 
 
19
def weave_ext(mod):
 
20
    d = mod.setup_extension().__dict__
 
21
    n = d['name']; del(d['name'])
 
22
    s = d['sources']; del(d['sources'])
 
23
    return n, s, d
 
24
 
 
25
if __name__ == '__main__':
 
26
 
 
27
    from numpy.distutils.core import setup
 
28
    setup(**configuration(top_path='', package_name='scipy.sandbox.models').todict())