[Python-checkins] cpython: Modify patchcheck.py to check for changes to configure.in.

ross.lagerwall python-checkins at python.org
Sun Mar 11 18:23:18 CET 2012


http://hg.python.org/cpython/rev/8ecd1a1c7dfc
changeset:   75523:8ecd1a1c7dfc
user:        Ross Lagerwall <rosslagerwall at gmail.com>
date:        Sun Mar 11 19:21:07 2012 +0200
summary:
  Modify patchcheck.py to check for changes to configure.in.

It now reports if configure and pyconfig.h.in weren't regenerated but
configure.in was changed.

files:
  Tools/scripts/patchcheck.py |  19 +++++++++++++++++++
  1 files changed, 19 insertions(+), 0 deletions(-)


diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py
--- a/Tools/scripts/patchcheck.py
+++ b/Tools/scripts/patchcheck.py
@@ -132,6 +132,21 @@
     """Check if Misc/NEWS has been changed."""
     return 'Misc/NEWS' in file_paths
 
+ at status("configure regenerated", modal=True, info=str)
+def regenerated_configure(file_paths):
+    """Check if configure has been regenerated."""
+    if 'configure.in' in file_paths:
+        return "yes" if 'configure' in file_paths else "no"
+    else:
+        return "not needed"
+
+ at status("pyconfig.h.in regenerated", modal=True, info=str)
+def regenerated_pyconfig_h_in(file_paths):
+    """Check if pyconfig.h.in has been regenerated."""
+    if 'configure.in' in file_paths:
+        return "yes" if 'pyconfig.h.in' in file_paths else "no"
+    else:
+        return "not needed"
 
 def main():
     file_paths = changed_files()
@@ -151,6 +166,10 @@
     credit_given(special_files)
     # Misc/NEWS changed.
     reported_news(special_files)
+    # Regenerated configure, if necessary.
+    regenerated_configure(file_paths)
+    # Regenerated pyconfig.h.in, if necessary.
+    regenerated_pyconfig_h_in(file_paths)
 
     # Test suite run and passed.
     if python_files or c_files:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list