]> granicus.if.org Git - python/commitdiff
Rerun the libffi configuration if any of the files used for that
authorThomas Heller <theller@ctypes.org>
Thu, 27 Apr 2006 15:50:42 +0000 (15:50 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 27 Apr 2006 15:50:42 +0000 (15:50 +0000)
are newer then fficonfig.py.

setup.py

index 750f47ca8f8e5a9c1f8f5416b9cfe2a033ab1a7f..e652969d0b574ed7edac23804f13edae8196c36f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1267,7 +1267,12 @@ class PyBuildExt(build_ext):
                                          '_ctypes', 'libffi'))
             ffi_configfile = os.path.join(ffi_builddir, 'fficonfig.py')
 
-            if self.force or not os.path.exists(ffi_configfile):
+            from distutils.dep_util import newer_group
+
+            config_sources = [os.path.join(ffi_srcdir, fname)
+                              for fname in os.listdir(ffi_srcdir)]
+            if self.force or newer_group(config_sources,
+                                         ffi_configfile):
                 from distutils.dir_util import mkpath
                 mkpath(ffi_builddir)
                 config_args = []