Permalink
Browse files

Merge revisions 3976:3998 from build_with_scons branch

  • Loading branch information...
cournape committed Mar 15, 2008
2 parents fb4682f + 653d1b9 commit a0a13e1386815f5ddb6fd6c0421af1f28a655dfa
Showing with 1,026 additions and 21 deletions.
  1. +1 −1 scipy/fftpack/SConstruct
  2. +4 −4 scipy/integrate/SConstruct
  3. +1 −1 scipy/interpolate/SConstruct
  4. +17 −0 scipy/maxentropy/setupscons.py
  5. +11 −0 scipy/misc/setupscons.py
  6. +22 −0 scipy/ndimage/SConstruct
  7. +15 −0 scipy/ndimage/setupscons.py
  8. +61 −0 scipy/odr/SConstruct
  9. +17 −0 scipy/odr/setupscons.py
  10. +99 −0 scipy/optimize/SConstruct
  11. +17 −0 scipy/optimize/setupscons.py
  12. +83 −0 scipy/sandbox/setupscons.py
  13. +15 −15 scipy/setupscons.py
  14. +19 −0 scipy/signal/SConstruct
  15. +15 −0 scipy/signal/setupscons.py
  16. +18 −0 scipy/sparse/SConstruct
  17. +47 −0 scipy/sparse/linalg/dsolve/SConstruct
  18. +20 −0 scipy/sparse/linalg/dsolve/setupscons.py
  19. +35 −0 scipy/sparse/linalg/dsolve/umfpack/SConstruct
  20. +32 −0 scipy/sparse/linalg/dsolve/umfpack/setupscons.py
  21. +44 −0 scipy/sparse/linalg/eigen/arpack/SConstruct
  22. +37 −0 scipy/sparse/linalg/eigen/arpack/setupscons.py
  23. +14 −0 scipy/sparse/linalg/eigen/setupscons.py
  24. +57 −0 scipy/sparse/linalg/isolve/SConstruct
  25. +16 −0 scipy/sparse/linalg/isolve/setupscons.py
  26. +19 −0 scipy/sparse/linalg/setupscons.py
  27. +21 −0 scipy/sparse/setupscons.py
  28. +61 −0 scipy/special/SConstruct
  29. +19 −0 scipy/special/setupscons.py
  30. +38 −0 scipy/stats/SConstruct
  31. +27 −0 scipy/stats/models/setupscons.py
  32. +17 −0 scipy/stats/setupscons.py
  33. +13 −0 scipy/stsci/convolve/SConstruct
  34. +20 −0 scipy/stsci/convolve/setupscons.py
  35. +11 −0 scipy/stsci/image/SConstruct
  36. +18 −0 scipy/stsci/image/setupscons.py
  37. +11 −0 scipy/stsci/setupscons.py
  38. +10 −0 scipy/testing/setupscons.py
  39. +24 −0 scipy/weave/setupscons.py
View
@@ -29,7 +29,7 @@ if has_fft:
pass
# Build dfftpack
-src = env.Glob(pjoin('dfftpack', '*.f'))
+src = env.NumpyGlob(pjoin('dfftpack', '*.f'))
dfftpack = env.NumpyStaticExtLibrary('dfftpack', source = [str(s) for s in src])
env.AppendUnique(LIBS = ['dfftpack'])
env.AppendUnique(LIBPATH = env['build_dir'])
@@ -25,20 +25,20 @@ env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
# XXX: lapack integration
# Build linpack_lite
-src = [str(s) for s in env.Glob(pjoin('linpack_lite', '*.f'))]
+src = [str(s) for s in env.NumpyGlob(pjoin('linpack_lite', '*.f'))]
linpack_lite = env.NumpyStaticExtLibrary('linpack_lite', source = src)
# Build mach
# XXX: do not use optimization flags for mach
-src = [str(s) for s in env.Glob(pjoin('mach', '*.f'))]
+src = [str(s) for s in env.NumpyGlob(pjoin('mach', '*.f'))]
mach = env.NumpyStaticExtLibrary('mach', source = src)
# Build quadpack
-src = [str(s) for s in env.Glob(pjoin('quadpack', '*.f'))]
+src = [str(s) for s in env.NumpyGlob(pjoin('quadpack', '*.f'))]
quadpack = env.NumpyStaticExtLibrary('quadpack', source = src)
# Build odepack
-src = [str(s) for s in env.Glob(pjoin('odepack', '*.f'))]
+src = [str(s) for s in env.NumpyGlob(pjoin('odepack', '*.f'))]
odepack = env.NumpyStaticExtLibrary('odepack', source = src)
#env.AppendUnique(LIBS = ['linpack_lite', 'quadpack', 'odepack', 'mach'])
@@ -17,7 +17,7 @@ env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
env.AppendUnique(LINKFLAGS = env['F77_LDFLAGS'])
# Build fitpack
-src = [str(s) for s in env.Glob(pjoin('fitpack', '*.f'))]
+src = [str(s) for s in env.NumpyGlob(pjoin('fitpack', '*.f'))]
fitpack = env.NumpyStaticExtLibrary('fitpack', source = src)
env.AppendUnique(LIBS = ['fitpack'])
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+from numpy.distutils.core import setup
+from numpy.distutils.misc_util import Configuration
+from os.path import join
+
+def configuration(parent_package='', top_path=None):
+
+ config = Configuration('maxentropy', parent_package, top_path)
+
+ config.add_data_dir('tests')
+ config.add_data_dir('examples')
+
+ return config
+
+if __name__ == '__main__':
+ setup(**configuration(top_path='').todict())
View
@@ -0,0 +1,11 @@
+
+def configuration(parent_package='',top_path=None):
+ from numpy.distutils.misc_util import Configuration
+ config = Configuration('misc',parent_package,top_path)
+ config.add_data_files('lena.dat')
+ config.add_data_dir('tests')
+ return config
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(**configuration(top_path='').todict())
View
@@ -0,0 +1,22 @@
+# Last Change: Wed Mar 05 09:00 PM 2008 J
+from os.path import join
+
+from numpy.distutils.misc_util import get_numpy_include_dirs
+from numscons import GetNumpyEnvironment
+
+env = GetNumpyEnvironment(ARGUMENTS)
+
+env.AppendUnique(CPPPATH = get_numpy_include_dirs())
+env.AppendUnique(CPPPATH = 'src')
+
+ndimage_src = ["nd_image.c", "ni_filters.c", "ni_fourier.c", "ni_interpolation.c",
+ "ni_measure.c", "ni_morphology.c", "ni_support.c"]
+env.NumpyPythonExtension('_nd_image', source = [join('src', i) for i in ndimage_src])
+
+segment_src = ['Segmenter_EXT.c', 'Segmenter_IMPL.c']
+env.NumpyPythonExtension('_segment', source = [join('src', 'segment', i)
+ for i in segment_src])
+
+register_src = ['Register_EXT.c', 'Register_IMPL.c']
+env.NumpyPythonExtension('_register', source = [join('src', 'register', i)
+ for i in register_src])
@@ -0,0 +1,15 @@
+from numpy.distutils.core import setup
+from numpy.distutils.misc_util import Configuration
+from numpy import get_include
+
+def configuration(parent_package='', top_path=None):
+
+ config = Configuration('ndimage', parent_package, top_path)
+
+ config.add_sconscript("SConstruct")
+ config.add_data_dir('tests')
+
+ return config
+
+if __name__ == '__main__':
+ setup(**configuration(top_path='').todict())
View
@@ -0,0 +1,61 @@
+# Last Change: Wed Mar 05 04:00 PM 2008 J
+# vim:syntax=python
+
+import os
+from os.path import join as pjoin, splitext
+
+from numpy.distutils.misc_util import get_numpy_include_dirs
+from numscons import get_python_inc#, get_pythonlib_dir
+from numscons import GetNumpyEnvironment
+from numscons import CheckF77BLAS, CheckF77Clib
+
+from numscons import write_info
+
+env = GetNumpyEnvironment(ARGUMENTS)
+env.Append(CPPPATH = [get_python_inc(), get_numpy_include_dirs()])
+#if os.name == 'nt':
+# # NT needs the pythonlib to run any code importing Python.h, including
+# # simple code using only typedef and so on, so we need it for configuration
+# # checks
+# env.AppendUnique(LIBPATH = [get_pythonlib_dir()])
+
+#=======================
+# Starting Configuration
+#=======================
+config = env.NumpyConfigure(custom_tests = {'CheckBLAS' : CheckF77BLAS,
+ 'CheckF77Clib' : CheckF77Clib})
+
+if not config.CheckF77Clib():
+ raise RuntimeError("Could not check F/C runtime library for %s/%s, " \
+ "contact the maintainer" % (env['CC'], env['F77']))
+
+#--------------
+# Checking Blas
+#--------------
+st = config.CheckBLAS()
+if not st:
+ has_blas = 0
+else:
+ has_blas = 1
+
+config.Finish()
+write_info(env)
+
+#==========
+# Build
+#==========
+
+# odr lib
+libodr_src = [pjoin('odrpack', i) for i in ['d_odr.f', 'd_mprec.f', 'dlunoc.f']]
+if has_blas:
+ libodr_src.append(pjoin('odrpack', 'd_lpk.f'))
+else:
+ libodr_src.append(pjoin('odrpack', 'd_lpkbls.f'))
+
+env.NumpyStaticExtLibrary('odrpack', source = libodr_src)
+env.AppendUnique(LIBS = 'odrpack')
+env.AppendUnique(LIBPATH = env['build_dir'])
+
+# odr pyextension
+env.NumpyPythonExtension('__odrpack', '__odrpack.c',
+ LINKFLAGSEND = env['F77_LDFLAGS'])
View
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+from os.path import join
+
+def configuration(parent_package='', top_path=None):
+ from numpy.distutils.misc_util import Configuration
+
+ config = Configuration('odr', parent_package, top_path)
+
+ config.add_sconscript('SConstruct')
+ config.add_data_dir('tests')
+
+ return config
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(**configuration(top_path='').todict())
View
@@ -0,0 +1,99 @@
+# Last Change: Wed Mar 05 11:00 PM 2008 J
+# vim:syntax=python
+
+import os
+from os.path import join as pjoin, splitext
+
+from numpy.distutils.misc_util import get_numpy_include_dirs
+from numscons import get_python_inc#, get_pythonlib_dir
+from numscons import GetNumpyEnvironment
+from numscons import CheckF77LAPACK, CheckF77Clib
+
+from numscons import write_info
+
+env = GetNumpyEnvironment(ARGUMENTS)
+env.Append(CPPPATH = get_numpy_include_dirs())
+env.Append(CPPPATH = env['F2PYINCLUDEDIR'])
+#if os.name == 'nt':
+# # NT needs the pythonlib to run any code importing Python.h, including
+# # simple code using only typedef and so on, so we need it for configuration
+# # checks
+# env.AppendUnique(LIBPATH = [get_pythonlib_dir()])
+
+#=======================
+# Starting Configuration
+#=======================
+config = env.NumpyConfigure(custom_tests = {'CheckLAPACK' : CheckF77LAPACK,
+ 'CheckF77Clib' : CheckF77Clib})
+
+#-----------------
+# Checking Lapack
+#-----------------
+if not config.CheckF77Clib():
+ raise RuntimeLibrary("Could not check C/F runtime library for %s/%s"\
+ " , contact the maintainer" % (env['CC'], env['F77']))
+
+st = config.CheckLAPACK()
+if not st:
+ has_lapack = 0
+else:
+ has_lapack = 1
+
+config.Finish()
+write_info(env)
+
+#==========
+# Build
+#==========
+
+# minpack lib
+minpack_src = [str(s) for s in env.NumpyGlob(pjoin('minpack', '*.f'))]
+env.NumpyStaticExtLibrary('minpack', source = minpack_src)
+
+# rootfind lib
+rootfind_src = [str(s) for s in env.NumpyGlob(pjoin('Zeros', '*.c'))]
+env.NumpyStaticExtLibrary('rootfind', source = rootfind_src)
+
+env.AppendUnique(LIBS = ['minpack', 'rootfind'])
+env.AppendUnique(LIBPATH = env['build_dir'])
+
+# _minpack pyextension
+env.NumpyPythonExtension('_minpack', '_minpackmodule.c',
+ LINKFLAGSEND = env['F77_LDFLAGS'])
+
+# _zeros pyextension
+env.NumpyPythonExtension('_zeros', 'zeros.c')
+
+# _lbfgsb pyextension
+src = pjoin('lbfgsb', 'routines.f')
+lbfgsb_src = env.F2py(pjoin(env['build_dir'], '_lbfgsbmodule.c'),
+ pjoin(env['build_dir'], 'lbfgsb', 'lbfgsb.pyf'))
+env.NumpyPythonExtension('_lbfgsb', source = [src] + lbfgsb_src,
+ LINKFLAGSEND = env['F77_LDFLAGS'])
+
+# _cobyla pyextension
+src = [pjoin('cobyla', i) for i in ['cobyla2.f', 'trstlp.f']]
+wrap_src = env.F2py(pjoin(env['build_dir'], 'cobyla', '_cobylamodule.c'),
+ pjoin(env['build_dir'], 'cobyla', 'cobyla.pyf'))
+env.NumpyPythonExtension('_cobyla', source = src + wrap_src,
+ LINKFLAGSEND = env['F77_LDFLAGS'])
+
+# _minpack2 pyextension
+src = [pjoin('minpack2', i) for i in ['dcsrch.f', 'dcstep.f']]
+wrap_src = env.F2py(pjoin(env['build_dir'], 'minpack2', 'minpack2module.c'),
+ pjoin(env['build_dir'], 'minpack2', 'minpack2.pyf'))
+env.NumpyPythonExtension('minpack2', source = src + wrap_src,
+ LINKFLAGSEND = env['F77_LDFLAGS'])
+
+# moduleTNC pyextension
+env.NumpyPythonExtension('moduleTNC',
+ source = [pjoin('tnc', i) for i in \
+ ['moduleTNC.c', 'tnc.c']])
+
+# _slsqp pyextension
+src = pjoin('slsqp', 'slsqp_optmz.f')
+slsqp_src = env.F2py(pjoin(env['build_dir'], '_slsqpmodule.c'),
+ pjoin(env['build_dir'], 'slsqp', 'slsqp.pyf'))
+env.NumpyPythonExtension('_slsqp', source = [src] + slsqp_src,
+ LINKFLAGSEND = env['F77_LDFLAGS'])
+
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+from os.path import join
+
+def configuration(parent_package='',top_path=None):
+ from numpy.distutils.misc_util import Configuration
+ from numpy.distutils.system_info import get_info
+ config = Configuration('optimize',parent_package, top_path)
+
+ config.add_sconscript('SConstruct')
+ config.add_data_dir('tests')
+
+ return config
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(**configuration(top_path='').todict())
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+
+from os.path import join
+
+def configuration(parent_package='',top_path=None):
+ from numpy.distutils.misc_util import Configuration
+ config = Configuration('sandbox',parent_package,top_path)
+
+ sandbox_packages = []
+ try:
+ sandbox_file = open(join(config.package_path,
+ 'enabled_packages.txt'), 'rU')
+ except IOError:
+ pass
+ else:
+ for line in sandbox_file:
+ p = line.strip()
+ if not p or p.startswith('#'):
+ continue
+ sandbox_packages.append(p)
+ sandbox_file.close()
+
+ for p in sandbox_packages:
+ config.add_subpackage(p)
+
+ # All subpackages should be commented out in the version
+ # committed to the repository. This prevents build problems
+ # for people who are not actively working with these
+ # potentially unstable packages.
+
+ # You can put a list of modules you want to always enable in the
+ # file 'enabled_packages.txt' in this directory (you'll have to create it).
+ # Since this isn't under version control, it's less likely you'll
+ # check it in and screw other people up :-)
+
+ # An example package:
+ #config.add_subpackage('exmplpackage')
+
+ # Monte Carlo package
+ #config.add_subpackage('montecarlo')
+
+ # Robert Kern's corner:
+ #config.add_subpackage('rkern')
+
+ # ODRPACK
+ #config.add_subpackage('odr')
+
+ # Delaunay triangulation and Natural Neighbor interpolation
+ #config.add_subpackage('delaunay')
+
+ # elementwise numerical expressions
+ #config.add_subpackage('numexpr')
+
+ # Adaptation of Scientific.IO (2.4.9) to use NumPy
+ #config.add_subpackage('netcdf')
+
+ # Finite Difference Formulae package
+ #config.add_subpackage('fdfpack')
+
+ # Package with useful constants and unit-conversions defined
+ #config.add_subpackage('constants')
+
+ # Interpolating between sparse samples
+ #config.add_subpackage('buildgrid')
+
+ # David Cournapeau's corner: autocorrelation, lpc, lpc residual
+ #config.add_subpackage('cdavid')
+
+ # New spline package (based on scipy.interpolate)
+ #config.add_subpackage('spline')
+
+ # Radial basis functions package
+ #config.add_subpackage('rbf')
+
+ # Multigrid Solvers
+ #config.add_subpackage('multigrid')
+
+
+ return config
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(**configuration(top_path='').todict())
Oops, something went wrong.

0 comments on commit a0a13e1

Please sign in to comment.