Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Doc updates. Cleanups after applying DEVELOPERS.txt requirements to s…

…cipy.
  • Loading branch information...
commit 611953751298a2dba7fd882bdea6004019cd16b0 1 parent 7434b18
@pearu pearu authored
Showing with 48 additions and 182 deletions.
  1. +16 −2 INSTALL.txt
  2. +0 −6 MANIFEST.in
  3. +29 −72 setup.py
  4. +3 −102 setup_no_chaco.py
View
18 INSTALL.txt
@@ -18,14 +18,20 @@ SciPy requires the following software installed:
1) Python__ 2.1.x, 2.2.x, or 2.3.x (see NOTES 1)
+ Debian packages: python python-dev
+
__ http://www.python.org
2) `Numerical Python`__ 21.0 or newer but not Numarray (yet)
+ Debian packages: python-numeric
+
__ http://www.numpy.org/
3) ATLAS__ 3.2.1 or newer and complete LAPACK__ (see NOTES 2, 3, 4)
+ Debian packages: atlas2-headers atlas2-base atlas2-base-dev
+
__ http://math-atlas.sourceforge.net/
__ http://www.netlib.org/lapack/
@@ -38,6 +44,8 @@ __ http://cens.ioc.ee/projects/f2py2e/
gcc__ 2.95.x, 3.x compilers are recommended.
When building with Chaco, gcc 3.x is required.
+ Debian packages: gcc g++ g77
+
__ http://gcc.gnu.org/
@@ -45,19 +53,25 @@ The following software is optional:
6) FFTW__ 2.1.x (see Lib/fftpack/NOTES.txt) but not 2.2.x (yet)
+ Debian packages: fftw2 fftw-dev
+
__ http://www.fftw.org/
7) wxPython__
- Debian packages: libwxgtk2.4-python libwxgtk2.4-dev wxwin2.4-headers
+ Debian packages: libwxgtk2.4-python libwxgtk2.4 libwxgtk2.4-dev
+ wxwin2.4-headers
__ http://www.wxpython.org/
8) SWIG 1.3.x, required when building with chaco. See setup.py
for how to disable chaco.
+ Debian packages: swig1.3 libswig1.3
+
9) chaco.tkplt requires
- Debian packages: python-opengl, python-pmw
+
+ Debian packages: python-opengl libglut3 python-pmw
NOTES
View
6 MANIFEST.in
@@ -1,7 +1 @@
-recursive-include Lib_chaco/freetype/freetype2 *.h *.c *.i
-recursive-include Lib_chaco/kiva/agg *.py *.h *.i *.cxx
-recursive-include Lib_chaco/kiva/agg/docs *
-recursive-include Lib_chaco/agg2 *
-recursive-include Lib_chaco/freetype *
-global-include *.txt setup*.py
prune scipy_core
View
101 setup.py
@@ -13,59 +13,23 @@
import sys
from glob import glob
+# Note that when running bdist_rpm, scipy_core directory does
+# not exist. So, scipy_distutils must be installed before
+# running bdist_rpm.
sys.path.insert(0,'scipy_core')
try:
import scipy_distutils
- assert 'scipy_core'==os.path.basename(os.path.dirname(\
- scipy_distutils.__path__[0])), scipy_distutils.__path__[0]
# Declare all scipy_distutils related imports here.
from scipy_distutils.misc_util import default_config_dict
from scipy_distutils.misc_util import get_path, merge_config_dicts
from scipy_distutils.core import setup
- if sys.platform == 'win32':
- # This forces g77 for windows platforms:
- from scipy_distutils.mingw32_support import *
finally:
del sys.path[0]
-#-------------------------------
-
-standard_packages = []
-
-standard_packages = [os.path.join('Lib',p) for p in standard_packages]
-
-graphics_packages = []
-graphics_packages = [os.path.join('Lib',p) for p in graphics_packages]
-
-chaco_packages = ['chaco','kiva','traits','freetype']
-chaco_packages = [os.path.join('Lib_chaco',p) for p in chaco_packages]
-
-#core_packages = ['scipy_distutils','scipy_test','scipy_base']
-#core_packages = [os.path.join('scipy_core',p) for p in core_packages]
-
-#---------------
-
-parent_package = 'scipy'
-
-scipy_packages = standard_packages
-scipy_packages += graphics_packages
-
-#---------------
-
-# these packages aren't nested under scipy
-separate_packages = []
-separate_packages = [os.path.join('Lib',p) for p in separate_packages]
-#separate_packages += core_packages
-separate_packages += chaco_packages
-
-ignore_packages = [
- #'sparse'
- ]
-
#------ drop-to-Lib packages --------
def get_packages(path,ignore_packages=[],
- parent=parent_package,parent_path=None):
+ parent='scipy',parent_path=None):
config_list = []
@@ -100,52 +64,31 @@ def get_packages(path,ignore_packages=[],
return config_list
#-------------------------------
-def get_package_config(name, parent=parent_package):
- sys.path.insert(0,name)
- try:
- mod = __import__('setup_'+os.path.basename(name))
- config = mod.configuration(parent)
- finally:
- del sys.path[0]
- return config
-
-def get_separate_package_config(name):
- return get_package_config(name,'')
-
def setup_package(ignore_packages=[]):
old_path = os.getcwd()
- path = get_path(__name__)
- os.chdir(path)
- sys.path.insert(0,os.path.join(path,'Lib'))
+ local_path = os.path.dirname(os.path.abspath(sys.argv[0]))
+ os.chdir(local_path)
+ sys.path.insert(0,os.path.join(local_path,'Lib'))
# setup files of subpackages require scipy_core:
- sys.path.insert(0,os.path.join(path,'scipy_core'))
+ sys.path.insert(0,os.path.join(local_path,'scipy_core'))
try:
- #sys.path.insert(0,os.path.join(path,'Lib'))
from scipy_version import scipy_version
- #del sys.path[0]
- config_list = [{'packages':['scipy','scipy.tests'],
+ config_list = [{'name': 'SciPy',
+ 'packages':['scipy','scipy.tests'],
'package_dir':
{'scipy':'Lib',
'scipy.tests':os.path.join('Lib','tests')}}]
- #new style packages:
- for d in ['scipy_core','Lib','Lib_chaco']:
- if sys.platform!='win32' and d=='Lib_chaco':
- # Currently chaco is working only on win32.
- continue
- config_list += get_packages(os.path.join(path,d),ignore_packages,
- parent_path=path)
-
- #old style packages:
- config_list += map(get_separate_package_config,separate_packages)
- config_list += map(get_package_config,scipy_packages)
+ for d in ['Lib','Lib_chaco']:
+ config_list += get_packages(os.path.join(local_path,d),
+ ignore_packages,
+ parent_path=local_path)
config_dict = merge_config_dicts(config_list)
print 'SciPy Version %s' % scipy_version
- setup (name = "SciPy",
- version = scipy_version,
+ setup( version = scipy_version,
maintainer = "SciPy Developers",
maintainer_email = "scipy-dev@scipy.org",
description = "Scientific Algorithms Library for Python",
@@ -159,5 +102,19 @@ def setup_package(ignore_packages=[]):
del sys.path[0]
os.chdir(old_path)
+ if os.path.isdir('scipy_core'):
+ # Applying the same commands to scipy_core.
+ # Results can be found in scipy_core directory.
+ c = '%s %s %s' % (sys.executable,
+ os.path.join('scipy_core','setup.py'),
+ ' '.join(sys.argv[1:]))
+ print c
+ s = os.system(c)
+ assert not s,'failed on scipy_core'
+
if __name__ == "__main__":
+ ignore_packages = [
+ #'sparse',
+ #'kiva','freetype','chaco','traits',
+ ]
setup_package(ignore_packages)
View
105 setup_no_chaco.py
@@ -1,107 +1,8 @@
#!/usr/bin/env python
-"""
-Installing scipy:
- python setup.py install
- python setup.py build build_flib install --fcompiler=Gnu
-Creating scipy distribution:
- python setup.py sdist -f
+from setup import setup_package
-"""
-
-import os
-import sys
-
-sys.path.insert(0,'scipy_core')
-try:
- # Declare all scipy_distutils related imports here.
- from scipy_distutils.misc_util import default_config_dict
- from scipy_distutils.misc_util import get_path, merge_config_dicts
- from scipy_distutils.core import setup
- if sys.platform == 'win32':
- # This forces g77 for windows platforms:
- from scipy_distutils.mingw32_support import *
-finally:
- del sys.path[0]
-
-#-------------------------------
-
-standard_packages = ['io','linalg',
- 'special','signal','stats',
- 'interpolate','integrate','optimize',
- 'cluster','cow','ga','fftpack'
-# ,'sparse'
- ]
-
-standard_packages = [os.path.join('Lib',p) for p in standard_packages]
-
-graphics_packages = ['plt','gplt','xplt']
-graphics_packages = [os.path.join('Lib',p) for p in graphics_packages]
-
-core_packages = ['scipy_distutils','scipy_test','scipy_base']
-core_packages = [os.path.join('scipy_core',p) for p in core_packages]
-
-#---------------
-
-parent_package = 'scipy'
-
-scipy_packages = standard_packages
-scipy_packages += graphics_packages
-
-#---------------
-
-# these packages aren't nested under scipy
-separate_packages = ['gui_thread','weave']
-separate_packages = [os.path.join('Lib',p) for p in separate_packages]
-separate_packages += core_packages
-
-#-------------------------------
-
-def get_package_config(name, parent=parent_package):
- sys.path.insert(0,name)
- try:
- mod = __import__('setup_'+os.path.basename(name))
- config = mod.configuration(parent)
- finally:
- del sys.path[0]
- return config
-
-def get_separate_package_config(name):
- return get_package_config(name,'')
-
-def setup_package():
- old_path = os.getcwd()
- path = get_path(__name__)
- os.chdir(path)
- sys.path.insert(0,os.path.join(path,'Lib'))
- # setup files of subpackages require scipy_core:
- sys.path.insert(0,os.path.join(path,'scipy_core'))
- try:
- from scipy_version import scipy_version
-
- config_list = [{'packages':['scipy','scipy.tests'],
- 'package_dir':
- {'scipy':'Lib',
- 'scipy.tests':os.path.join('Lib','tests')}}]
- config_list += map(get_separate_package_config,separate_packages)
- config_list += map(get_package_config,scipy_packages)
- config_dict = merge_config_dicts(config_list)
-
- print 'SciPy Version %s' % scipy_version
- setup (name = "SciPy",
- version = scipy_version,
- maintainer = "SciPy Developers",
- maintainer_email = "scipy-dev@scipy.org",
- description = "Scientific Algorithms Library for Python",
- license = "SciPy License (BSD Style)",
- url = "http://www.scipy.org",
- **config_dict
- )
-
- finally:
- del sys.path[0]
- del sys.path[0]
- os.chdir(old_path)
+ignore_packages = ['chaco','kiva','freetype','traits']
if __name__ == "__main__":
- setup_package()
+ setup_package(ignore_packages)

0 comments on commit 6119537

Please sign in to comment.
Something went wrong with that request. Please try again.