summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2006-04-27 15:50:42 (GMT)
committerThomas Heller <theller@ctypes.org>2006-04-27 15:50:42 (GMT)
commit5e218b44549153816f2dd842d532b2ea5aa476e8 (patch)
tree77696c6883119392e7de338c6c4014f824ca2ab3 /setup.py
parent2574f5cd8bfa7d504706f1f481ede5748a64e9f3 (diff)
downloadcpython-5e218b44549153816f2dd842d532b2ea5aa476e8.zip
cpython-5e218b44549153816f2dd842d532b2ea5aa476e8.tar.gz
cpython-5e218b44549153816f2dd842d532b2ea5aa476e8.tar.bz2
Rerun the libffi configuration if any of the files used for that
are newer then fficonfig.py.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 750f47c..e652969 100644
--- 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 = []