blob: b69ab48da182f1ffff77b1c2d4dbe3708d85a734 [file] [log] [blame]
Fernando Perez36d3c162006-07-12 06:02:281#!/usr/bin/env python
Travis Oliphantc8b5a7e2006-01-06 02:12:502"""NumPy: array processing for numbers, strings, records, and objects.
Travis Oliphantda9c6da2006-01-04 17:31:073
Travis Oliphantc8b5a7e2006-01-06 02:12:504NumPy is a general-purpose array-processing package designed to
Travis Oliphantda9c6da2006-01-04 17:31:075efficiently manipulate large multi-dimensional arrays of arbitrary
6records without sacrificing too much speed for small multi-dimensional
Travis Oliphantc8b5a7e2006-01-06 02:12:507arrays. NumPy is built on the Numeric code base and adds features
Travis Oliphantda9c6da2006-01-04 17:31:078introduced by numarray as well as an extended C-API and the ability to
9create arrays of arbitrary type.
10
11There are also basic facilities for discrete fourier transform,
12basic linear algebra and random number generation.
13"""
14
15DOCLINES = __doc__.split("\n")
Pearu Petersonc415fd12002-11-18 22:39:3116
Pearu Petersone8fa0132003-03-07 18:08:2817import os
18import sys
Pearu Petersonc415fd12002-11-18 22:39:3119
Travis Oliphantda9c6da2006-01-04 17:31:0720CLASSIFIERS = """\
21Development Status :: 4 - Beta
22Intended Audience :: Science/Research
23Intended Audience :: Developers
24License :: OSI Approved
25Programming Language :: C
26Programming Language :: Python
27Topic :: Software Development
28Topic :: Scientific/Engineering
29Operating System :: Microsoft :: Windows
30Operating System :: POSIX
31Operating System :: Unix
32Operating System :: MacOS
33"""
34
Fernando Perez36d3c162006-07-12 06:02:2835# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
36# update it when the contents of directories change.
37if os.path.exists('MANIFEST'): os.remove('MANIFEST')
38
Pearu Peterson471196b2006-03-31 08:59:3639def configuration(parent_package='',top_path=None):
40 from numpy.distutils.misc_util import Configuration
41
Pearu Peterson17d7cfe2006-04-04 12:26:1442 config = Configuration(None, parent_package, top_path)
Pearu Peterson471196b2006-03-31 08:59:3643 config.set_options(ignore_setup_xxx_py=True,
44 assume_default_configuration=True,
45 delegate_options_to_subpackages=True,
46 quiet=True)
47
48 config.add_subpackage('numpy')
Pearu Peterson17d7cfe2006-04-04 12:26:1449
Pearu Peterson471196b2006-03-31 08:59:3650 config.add_data_files(('numpy',['*.txt','COMPATIBILITY',
51 'scipy_compatibility']))
Pearu Peterson17d7cfe2006-04-04 12:26:1452
53 config.get_version('numpy/version.py') # sets config.version
Pearu Peterson471196b2006-03-31 08:59:3654
55 return config
56
Pearu Petersone8fa0132003-03-07 18:08:2857def setup_package():
Travis Oliphant14db4192005-09-14 22:08:4658
Travis Oliphantda9c6da2006-01-04 17:31:0759 from numpy.distutils.core import setup
Travis Oliphant14db4192005-09-14 22:08:4660
Pearu Petersone8fa0132003-03-07 18:08:2861 old_path = os.getcwd()
Pearu Petersond1906742003-11-24 22:50:4062 local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
63 os.chdir(local_path)
Travis Oliphant14db4192005-09-14 22:08:4664 sys.path.insert(0,local_path)
Pearu Petersone8fa0132003-03-07 18:08:2865
66 try:
Pearu Peterson17d7cfe2006-04-04 12:26:1467 from numpy.version import version
68 setup(
69 name = 'numpy',
70 version = version, # will be overwritten by configuration version
71 maintainer = "NumPy Developers",
72 maintainer_email = "numpy-discussion@lists.sourceforge.net",
73 description = DOCLINES[0],
74 long_description = "\n".join(DOCLINES[2:]),
75 url = "http://numeric.scipy.org",
cookedm2276bf72006-04-21 16:15:1276 download_url = "http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103",
Pearu Peterson17d7cfe2006-04-04 12:26:1477 license = 'BSD',
78 classifiers=filter(None, CLASSIFIERS.split('\n')),
79 author = "Travis E. Oliphant, et.al.",
80 author_email = "oliphant@ee.byu.edu",
81 platforms = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
82 configuration=configuration )
Pearu Petersone8fa0132003-03-07 18:08:2883 finally:
84 del sys.path[0]
85 os.chdir(old_path)
Travis Oliphant14db4192005-09-14 22:08:4686 return
Pearu Petersonc415fd12002-11-18 22:39:3187
Travis Oliphant14db4192005-09-14 22:08:4688if __name__ == '__main__':
Pearu Petersone8fa0132003-03-07 18:08:2889 setup_package()