summaryrefslogtreecommitdiff
path: root/scipy/weave/setup.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-09-26 20:39:13 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-09-26 20:39:13 +0000
commit64c9050515e3cfa7ad095299f9648ebc5530a823 (patch)
tree6ea6a3811965788d4e0c9327188a942a899225b9 /scipy/weave/setup.py
parent45d01a4be1c4221132ba46d687e6af3a8df3329b (diff)
downloadnumpy-64c9050515e3cfa7ad095299f9648ebc5530a823.tar.gz
Moved weave to be a sub-package of scipy (so as not to conflict with any already installed weave which uses Numeric.
Diffstat (limited to 'scipy/weave/setup.py')
-rwxr-xr-xscipy/weave/setup.py68
1 files changed, 29 insertions, 39 deletions
diff --git a/scipy/weave/setup.py b/scipy/weave/setup.py
index e6bee0f5a..970fb5770 100755
--- a/scipy/weave/setup.py
+++ b/scipy/weave/setup.py
@@ -1,42 +1,32 @@
#!/usr/bin/env python
-import os,sys
-from scipy.distutils.core import setup
-from scipy.distutils.misc_util import get_path, merge_config_dicts
-from scipy.distutils.misc_util import package_config
-from weave_version import weave_version
-
-def stand_alone_package(with_dependencies = 0):
- path = get_path(__name__)
- old_path = os.getcwd()
- os.chdir(path)
- try:
- primary = ['weave']
- if with_dependencies:
- dependencies= ['scipy.distutils','scipy.test','scipy.base']
- else:
- dependencies = []
-
- print 'dep:', dependencies
- config_dict = package_config(primary,dependencies)
- config_dict['name'] = 'weave'
- setup (version = weave_version,
- description = "Tools for inlining C/C++ in Python",
- author = "Eric Jones",
- author_email = "eric@enthought.com",
- licence = "SciPy License (BSD Style)",
- url = 'http://www.scipy.org',
- **config_dict
- )
- finally:
- os.chdir(old_path)
+import os
+from glob import glob
+from scipy.distutils.misc_util import get_path, Configuration, dot_join
-if __name__ == '__main__':
- import sys
- if '--without-dependencies' in sys.argv:
- with_dependencies = 0
- sys.argv.remove('--without-dependencies')
- else:
- with_dependencies = 1
- stand_alone_package(with_dependencies)
-
+def configuration(parent_package='',parent_path=None):
+ parent_path2 = parent_path
+ parent_path = parent_package
+ local_path = get_path(__name__,parent_path2)
+ config = Configuration('weave',parent_package)
+ config.add_subpackage('tests')
+ scxx_files = glob(os.path.join(local_path,'scxx','*.*'))
+ install_path = os.path.join(parent_path,'weave','scxx')
+ config.add_data_dir('scxx')
+ config.add_data_dir(os.path.join('blitz','blitz'))
+ config.add_data_dir(os.path.join('blitz','blitz','array'))
+ config.add_data_dir(os.path.join('blitz','blitz','meta'))
+ config.add_data_files(*glob(os.path.join(local_path,'doc','*.html')))
+ config.add_data_files(*glob(os.path.join(local_path,'examples','*.py')))
+ return config
+
+if __name__ == '__main__':
+ from scipy.distutils.core import setup
+ from weave_version import weave_version
+ setup(version = weave_version,
+ description = "Tools for inlining C/C++ in Python",
+ author = "Eric Jones",
+ author_email = "eric@enthought.com",
+ licence = "SciPy License (BSD Style)",
+ url = 'http://www.scipy.org',
+ **configuration(parent_path=''))