~ubuntu-branches/ubuntu/feisty/python-numpy/feisty

« back to all changes in this revision

Viewing changes to numpy/linalg/setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-12 10:00:24 UTC
  • Revision ID: james.westby@ubuntu.com-20060712100024-5lw9q2yczlisqcrt
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
from os.path import join
 
3
 
 
4
def configuration(parent_package='',top_path=None):
 
5
    from numpy.distutils.misc_util import Configuration
 
6
    from numpy.distutils.system_info import get_info
 
7
    config = Configuration('linalg',parent_package,top_path)
 
8
 
 
9
    # Configure lapack_lite
 
10
    lapack_info = get_info('lapack_opt',0)
 
11
    def get_lapack_lite_sources(ext, build_dir):
 
12
        if not lapack_info:
 
13
            print "### Warning:  Using unoptimized lapack ###"
 
14
            return ext.depends[:-1]
 
15
        else:
 
16
            return ext.depends[:1]
 
17
 
 
18
    config.add_extension('lapack_lite',
 
19
                         sources = [get_lapack_lite_sources],
 
20
                         depends=  ['lapack_litemodule.c',
 
21
                                   'zlapack_lite.c', 'dlapack_lite.c',
 
22
                                   'blas_lite.c', 'dlamch.c',
 
23
                                   'f2c_lite.c','f2c.h'],
 
24
                         extra_info = lapack_info
 
25
                         )
 
26
 
 
27
    return config
 
28
 
 
29
if __name__ == '__main__':
 
30
    from numpy.distutils.core import setup
 
31
    setup(**configuration(top_path='').todict())