Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 98 lines (79 sloc) 3.437 kB
e1eac74 @cournape Add root setupscons.py files, to start working on building numpy with…
cournape authored
1 #!/usr/bin/env python
2 """NumPy: array processing for numbers, strings, records, and objects.
3
4 NumPy is a general-purpose array-processing package designed to
5 efficiently manipulate large multi-dimensional arrays of arbitrary
6 records without sacrificing too much speed for small multi-dimensional
7 arrays. NumPy is built on the Numeric code base and adds features
8 introduced by numarray as well as an extended C-API and the ability to
9 create arrays of arbitrary type which also makes NumPy suitable for
10 interfacing with general-purpose data-base applications.
11
12 There are also basic facilities for discrete fourier transform,
13 basic linear algebra and random number generation.
14 """
15
16 DOCLINES = __doc__.split("\n")
17
18 import __builtin__
19 import os
20 import sys
21
22 CLASSIFIERS = """\
23 Development Status :: 4 - Beta
24 Intended Audience :: Science/Research
25 Intended Audience :: Developers
26 License :: OSI Approved
27 Programming Language :: C
28 Programming Language :: Python
29 Topic :: Software Development
30 Topic :: Scientific/Engineering
31 Operating System :: Microsoft :: Windows
32 Operating System :: POSIX
33 Operating System :: Unix
34 Operating System :: MacOS
35 """
36
37 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
38 # update it when the contents of directories change.
39 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
40
41 # This is a bit hackish: we are setting a global variable so that the main
42 # numpy __init__ can detect if it is being loaded by the setup routine, to
43 # avoid attempting to load components that aren't built yet. While ugly, it's
44 # a lot more robust than what was previously being used.
45 __builtin__.__NUMPY_SETUP__ = True
46
47 def configuration(parent_package='',top_path=None):
48 from numpy.distutils.misc_util import Configuration
49
50 config = Configuration(None, parent_package, top_path, setup_name = 'setupscons.py')
51 config.set_options(ignore_setup_xxx_py=True,
52 assume_default_configuration=True,
53 delegate_options_to_subpackages=True,
54 quiet=True)
55
56 config.add_subpackage('numpy')
57
58 config.add_data_files(('numpy','*.txt'),
59 ('numpy','COMPATIBILITY'),
60 ('numpy','site.cfg.example'),
61 ('numpy','setup.py'))
62
63 config.get_version('numpy/version.py') # sets config.version
64
65 return config
66
67 def setup_package():
68
69 from numpy.distutils.core import setup
70
71 old_path = os.getcwd()
72 local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
73 os.chdir(local_path)
74 sys.path.insert(0,local_path)
75
76 try:
77 setup(
78 name = 'numpy',
79 maintainer = "NumPy Developers",
80 maintainer_email = "numpy-discussion@lists.sourceforge.net",
81 description = DOCLINES[0],
82 long_description = "\n".join(DOCLINES[2:]),
83 url = "http://numeric.scipy.org",
84 download_url = "http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103",
85 license = 'BSD',
86 classifiers=filter(None, CLASSIFIERS.split('\n')),
87 author = "Travis E. Oliphant, et.al.",
88 author_email = "oliphant@ee.byu.edu",
89 platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
90 configuration=configuration )
91 finally:
92 del sys.path[0]
93 os.chdir(old_path)
94 return
95
96 if __name__ == '__main__':
97 setup_package()
Something went wrong with that request. Please try again.