[Scipy-svn] r4349 - in branches/refactor_fft/scipy/fftpack/backends: . fftw3

scipy-svn at scipy.org scipy-svn at scipy.org
Thu May 15 12:09:37 EDT 2008


Author: cdavid
Date: 2008-05-15 11:09:30 -0500 (Thu, 15 May 2008)
New Revision: 4349

Added:
   branches/refactor_fft/scipy/fftpack/backends/fftw3/setup.py
Modified:
   branches/refactor_fft/scipy/fftpack/backends/setup.py
Log:
More work on setup scripts for fftpack backends.

Copied: branches/refactor_fft/scipy/fftpack/backends/fftw3/setup.py (from rev 4338, branches/refactor_fft/scipy/fftpack/backends/setup.py)
===================================================================
--- branches/refactor_fft/scipy/fftpack/backends/setup.py	2008-05-15 12:31:58 UTC (rev 4338)
+++ branches/refactor_fft/scipy/fftpack/backends/fftw3/setup.py	2008-05-15 16:09:30 UTC (rev 4349)
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# Created by Pearu Peterson, August 2002
+
+from os.path import join
+
+def build_backends(config):
+    from numpy.distutils.system_info import get_info
+    src = [join('src', i) for i in 
+                             ['zfft.cxx', 'drfft.cxx', 'zfftnd.cxx']]
+    info = get_info("fftw3")
+    if info:
+        config.add_library("fftw3_backend",
+                           sources = src,
+                           include_dirs = ["../common",
+                                           info['include_dirs']])
+        config.add_extension("_fftw3", sources = ["fftw3.pyf"], extra_info = info, libraries = ["fftw3_backend"])
+    
+def configuration(parent_package='',top_path=None):
+    from numpy.distutils.misc_util import Configuration
+
+    config = Configuration('fftw3', parent_package, top_path)
+    build_backends(config)
+
+    return config
+
+if __name__ == '__main__':
+    from numpy.distutils.core import setup
+    setup(**configuration(top_path='').todict())

Modified: branches/refactor_fft/scipy/fftpack/backends/setup.py
===================================================================
--- branches/refactor_fft/scipy/fftpack/backends/setup.py	2008-05-15 16:05:29 UTC (rev 4348)
+++ branches/refactor_fft/scipy/fftpack/backends/setup.py	2008-05-15 16:09:30 UTC (rev 4349)
@@ -3,36 +3,11 @@
 
 from os.path import join
 
-def build_backends(config):
-    from numpy.distutils.system_info import get_info
-    # Build backends for fftpack and convolve
-    backends_src = {}
-    backends_src['djbfft'] = [join('djbfft/', i) for i in 
-                              ['zfft.cxx', 'drfft.cxx', 'convolve.cxx']]
-    backends_src['fftw3'] = [join('fftw3/src', i) for i in 
-                             ['zfft.cxx', 'drfft.cxx', 'zfftnd.cxx']]
-    backends_src['fftw2'] = [join('fftw/', i) for i in 
-                             ['zfft.cxx', 'drfft.cxx', 'zfftnd.cxx', 'convolve.cxx']]
-    backends_src['fftpack'] = [join('fftpack/', i) for i in 
-                             ['zfft.cxx', 'drfft.cxx', 'zfftnd.cxx', 'convolve.cxx']]
-    backends_src['mkl'] = [join('mkl/', i) for i in 
-                             ['zfft.cxx', 'zfftnd.cxx']]
-
-    backends = ['mkl', 'djbfft', 'fftw3', 'fftw2']
-    for backend in backends:
-        info = get_info(backend)
-        if info:
-            config.add_library("%s_backend" % backend,
-                               sources = backends_src[backend],
-                               include_dirs = ["common",
-                                               info['include_dirs']])
-            config.add_extension("_%s" % backend, sources = [join(backend, "%s.pyf" % backend)], extra_info = info, libraries = ["%s_backend" % backend])
-
 def configuration(parent_package='',top_path=None):
     from numpy.distutils.misc_util import Configuration
-
     config = Configuration('backends', parent_package, top_path)
-    build_backends(config)
+        
+    config.add_subpackage("fftw3")
 
     return config
 




More information about the Scipy-svn mailing list