Skip to content
Newer
Older
100755 112 lines (85 sloc) 3.35 KB
9a33ce4 @cournape Add root setupscons.py
cournape authored
1 #!/usr/bin/env python
2 """SciPy: Scientific Library for Python
3
4 SciPy (pronounced "Sigh Pie") is open-source software for mathematics,
5 science, and engineering. The SciPy library
6 depends on NumPy, which provides convenient and fast N-dimensional
7 array manipulation. The SciPy library is built to work with NumPy
8 arrays, and provides many user-friendly and efficient numerical
9 routines such as routines for numerical integration and optimization.
10 Together, they run on all popular operating systems, are quick to
11 install, and are free of charge. NumPy and SciPy are easy to use,
12 but powerful enough to be depended upon by some of the world's
13 leading scientists and engineers. If you need to manipulate
14 numbers on a computer and display or publish the results,
15 give SciPy a try!
16
17 """
18
19 DOCLINES = __doc__.split("\n")
20
21 import os
22 import sys
23
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
24
9a33ce4 @cournape Add root setupscons.py
cournape authored
25 CLASSIFIERS = """\
26 Development Status :: 4 - Beta
27 Intended Audience :: Science/Research
28 Intended Audience :: Developers
29 License :: OSI Approved
30 Programming Language :: C
31 Programming Language :: Python
32 Topic :: Software Development
33 Topic :: Scientific/Engineering
34 Operating System :: Microsoft :: Windows
35 Operating System :: POSIX
36 Operating System :: Unix
37 Operating System :: MacOS
38
39 """
40
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
41
9a33ce4 @cournape Add root setupscons.py
cournape authored
42 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
43 # update it when the contents of directories change.
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
44 if os.path.exists('MANIFEST'):
45 os.remove('MANIFEST')
9a33ce4 @cournape Add root setupscons.py
cournape authored
46
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
47 os.environ['NO_SCIPY_IMPORT'] = 'SciPy/setup.py'
9a33ce4 @cournape Add root setupscons.py
cournape authored
48
94fb402 @cournape Fix scons inplace build.
cournape authored
49 sys.path.insert(0, os.path.dirname(__file__))
50 try:
51 setup_py = __import__("setup")
52 write_version_py = setup_py.write_version_py
53 finally:
54 sys.path.pop(0)
55
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
56
9a33ce4 @cournape Add root setupscons.py
cournape authored
57 def configuration(parent_package='',top_path=None):
58 from numpy.distutils.misc_util import Configuration
59 config = Configuration(None, parent_package, top_path, setup_name = "setupscons.py")
60 config.set_options(ignore_setup_xxx_py=True,
61 assume_default_configuration=True,
62 delegate_options_to_subpackages=True,
63 quiet=True)
64
65 config.add_subpackage('scipy')
66 config.add_data_files(('scipy','*.txt'))
67
68 config.get_version('scipy/version.py') # sets config.version
69
70 return config
71
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
72
9a33ce4 @cournape Add root setupscons.py
cournape authored
73 def setup_package():
74
75 from numpy.distutils.core import setup
76 from numpy.distutils.misc_util import Configuration
77
78 old_path = os.getcwd()
79 local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
80 os.chdir(local_path)
81 sys.path.insert(0,local_path)
82 sys.path.insert(0,os.path.join(local_path,'scipy')) # to retrive version
83
94fb402 @cournape Fix scons inplace build.
cournape authored
84 # Rewrite the version file everytime
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
85 if os.path.exists('scipy/version.py'):
86 os.remove('scipy/version.py')
87
94fb402 @cournape Fix scons inplace build.
cournape authored
88 write_version_py()
89
9a33ce4 @cournape Add root setupscons.py
cournape authored
90 try:
91 setup(
92 name = 'scipy',
93 maintainer = "SciPy Developers",
94 maintainer_email = "scipy-dev@scipy.org",
95 description = DOCLINES[0],
96 long_description = "\n".join(DOCLINES[2:]),
97 url = "http://www.scipy.org",
98 download_url = "http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531",
99 license = 'BSD',
3add620 @pv MAINT: Automated 2to3 conversion of the code base
pv authored
100 classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
9a33ce4 @cournape Add root setupscons.py
cournape authored
101 platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
102 configuration=configuration )
103 finally:
104 del sys.path[0]
105 os.chdir(old_path)
106
107 return
108
74dccec @scottza ENH: Add Git revision hint to version information for dev versions
scottza authored
109
9a33ce4 @cournape Add root setupscons.py
cournape authored
110 if __name__ == '__main__':
111 setup_package()
Something went wrong with that request. Please try again.