summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2006-04-27 15:50:42 +0000
committerThomas Heller <theller@ctypes.org>2006-04-27 15:50:42 +0000
commitd277ba009b9a2ee76bd3b43205a6cd5485d106b6 (patch)
tree04e8373a2c139ffef03c398c3a2143d282719ae5 /setup.py
parent927afeb3a12a001c166fdcae38e227ef2597a2dd (diff)
downloadcpython-d277ba009b9a2ee76bd3b43205a6cd5485d106b6.tar.gz
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 750f47ca8f..e652969d0b 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 = []