[Numpy-svn] r4699 - in branches/build_with_scons/numpy: distutils f2py oldnumeric testing
numpy-svn at scipy.org
numpy-svn at scipy.org
Sun Jan 6 21:45:12 EST 2008
Author: cdavid
Date: 2008-01-06 20:44:56 -0600 (Sun, 06 Jan 2008)
New Revision: 4699
Added:
branches/build_with_scons/numpy/distutils/setupscons.py
branches/build_with_scons/numpy/f2py/setupscons.py
branches/build_with_scons/numpy/oldnumeric/setupscons.py
branches/build_with_scons/numpy/testing/setupscons.py
Log:
Add setupscons.py for pure python packages
Added: branches/build_with_scons/numpy/distutils/setupscons.py
===================================================================
--- branches/build_with_scons/numpy/distutils/setupscons.py 2008-01-07 02:43:05 UTC (rev 4698)
+++ branches/build_with_scons/numpy/distutils/setupscons.py 2008-01-07 02:44:56 UTC (rev 4699)
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+def configuration(parent_package='',top_path=None):
+ from numpy.distutils.misc_util import Configuration
+ config = Configuration('distutils',parent_package,top_path)
+ config.add_subpackage('command')
+ config.add_subpackage('fcompiler')
+ config.add_data_dir('tests')
+ config.add_data_files('site.cfg')
+ config.make_config_py()
+ return config
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(configuration=configuration)
Added: branches/build_with_scons/numpy/f2py/setupscons.py
===================================================================
--- branches/build_with_scons/numpy/f2py/setupscons.py 2008-01-07 02:43:05 UTC (rev 4698)
+++ branches/build_with_scons/numpy/f2py/setupscons.py 2008-01-07 02:44:56 UTC (rev 4699)
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+"""
+setup.py for installing F2PY
+
+Usage:
+ python setup.py install
+
+Copyright 2001-2005 Pearu Peterson all rights reserved,
+Pearu Peterson <pearu at cens.ioc.ee>
+Permission to use, modify, and distribute this software is given under the
+terms of the NumPy License.
+
+NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+$Revision: 1.32 $
+$Date: 2005/01/30 17:22:14 $
+Pearu Peterson
+"""
+
+__version__ = "$Id: setup.py,v 1.32 2005/01/30 17:22:14 pearu Exp $"
+
+import os
+import sys
+from distutils.dep_util import newer
+from numpy.distutils import log
+from numpy.distutils.core import setup
+from numpy.distutils.misc_util import Configuration
+
+from __version__ import version
+
+def configuration(parent_package='',top_path=None):
+ config = Configuration('f2py', parent_package, top_path)
+
+ config.add_subpackage('lib')
+
+ config.add_data_dir('docs')
+
+ config.add_data_files('src/fortranobject.c',
+ 'src/fortranobject.h',
+ 'f2py.1'
+ )
+
+ config.make_svn_version_py()
+
+ def generate_f2py_py(build_dir):
+ f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:]
+ if f2py_exe[-4:]=='.exe':
+ f2py_exe = f2py_exe[:-4] + '.py'
+ if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
+ f2py_exe = f2py_exe + '.py'
+ target = os.path.join(build_dir,f2py_exe)
+ if newer(__file__,target):
+ log.info('Creating %s', target)
+ f = open(target,'w')
+ f.write('''\
+#!/usr/bin/env %s
+# See http://cens.ioc.ee/projects/f2py2e/
+import os, sys
+for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
+ try:
+ i=sys.argv.index("--"+mode)
+ del sys.argv[i]
+ break
+ except ValueError: pass
+os.environ["NO_SCIPY_IMPORT"]="f2py"
+if mode=="g3-numpy":
+ try:
+ from main import main
+ except ImportError:
+ from numpy.f2py.lib.api import main
+elif mode=="2e-numeric":
+ from f2py2e import main
+elif mode=="2e-numarray":
+ sys.argv.append("-DNUMARRAY")
+ from f2py2e import main
+elif mode=="2e-numpy":
+ from numpy.f2py import main
+else:
+ print >> sys.stderr, "Unknown mode:",`mode`
+ sys.exit(1)
+main()
+'''%(os.path.basename(sys.executable)))
+ f.close()
+ return target
+
+ config.add_scripts(generate_f2py_py)
+
+ log.info('F2PY Version %s', config.get_version())
+
+ return config
+
+if __name__ == "__main__":
+
+ config = configuration(top_path='')
+ version = config.get_version()
+ print 'F2PY Version',version
+ config = config.todict()
+
+ if sys.version[:3]>='2.3':
+ config['download_url'] = "http://cens.ioc.ee/projects/f2py2e/2.x"\
+ "/F2PY-2-latest.tar.gz"
+ config['classifiers'] = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: Science/Research',
+ 'License :: OSI Approved :: NumPy License',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: C',
+ 'Programming Language :: Fortran',
+ 'Programming Language :: Python',
+ 'Topic :: Scientific/Engineering',
+ 'Topic :: Software Development :: Code Generators',
+ ]
+ setup(version=version,
+ description = "F2PY - Fortran to Python Interface Generaton",
+ author = "Pearu Peterson",
+ author_email = "pearu at cens.ioc.ee",
+ maintainer = "Pearu Peterson",
+ maintainer_email = "pearu at cens.ioc.ee",
+ license = "BSD",
+ platforms = "Unix, Windows (mingw|cygwin), Mac OSX",
+ long_description = """\
+The Fortran to Python Interface Generator, or F2PY for short, is a
+command line tool (f2py) for generating Python C/API modules for
+wrapping Fortran 77/90/95 subroutines, accessing common blocks from
+Python, and calling Python functions from Fortran (call-backs).
+Interfacing subroutines/data from Fortran 90/95 modules is supported.""",
+ url = "http://cens.ioc.ee/projects/f2py2e/",
+ keywords = ['Fortran','f2py'],
+ **config)
Property changes on: branches/build_with_scons/numpy/f2py/setupscons.py
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/build_with_scons/numpy/oldnumeric/setupscons.py
===================================================================
--- branches/build_with_scons/numpy/oldnumeric/setupscons.py 2008-01-07 02:43:05 UTC (rev 4698)
+++ branches/build_with_scons/numpy/oldnumeric/setupscons.py 2008-01-07 02:44:56 UTC (rev 4699)
@@ -0,0 +1,8 @@
+
+def configuration(parent_package='',top_path=None):
+ from numpy.distutils.misc_util import Configuration
+ return Configuration('oldnumeric',parent_package,top_path)
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(configuration=configuration)
Added: branches/build_with_scons/numpy/testing/setupscons.py
===================================================================
--- branches/build_with_scons/numpy/testing/setupscons.py 2008-01-07 02:43:05 UTC (rev 4698)
+++ branches/build_with_scons/numpy/testing/setupscons.py 2008-01-07 02:44:56 UTC (rev 4699)
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+def configuration(parent_package='',top_path=None):
+ from numpy.distutils.misc_util import Configuration
+ config = Configuration('testing',parent_package,top_path)
+ return config
+
+if __name__ == '__main__':
+ from numpy.distutils.core import setup
+ setup(maintainer = "NumPy Developers",
+ maintainer_email = "numpy-dev at numpy.org",
+ description = "NumPy test module",
+ url = "http://www.numpy.org",
+ license = "NumPy License (BSD Style)",
+ configuration = configuration,
+ )
Property changes on: branches/build_with_scons/numpy/testing/setupscons.py
___________________________________________________________________
Name: svn:executable
+ *
More information about the Numpy-svn
mailing list