Skip to content

Commit 6c52c57

Browse files
committed
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.
1 parent b4a9237 commit 6c52c57

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Tools/scripts/patchcheck.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ def reported_news(file_paths):
132132
"""Check if Misc/NEWS has been changed."""
133133
return 'Misc/NEWS' in file_paths
134134

135+
@status("configure regenerated", modal=True, info=str)
136+
def regenerated_configure(file_paths):
137+
"""Check if configure has been regenerated."""
138+
if 'configure.in' in file_paths:
139+
return "yes" if 'configure' in file_paths else "no"
140+
else:
141+
return "not needed"
142+
143+
@status("pyconfig.h.in regenerated", modal=True, info=str)
144+
def regenerated_pyconfig_h_in(file_paths):
145+
"""Check if pyconfig.h.in has been regenerated."""
146+
if 'configure.in' in file_paths:
147+
return "yes" if 'pyconfig.h.in' in file_paths else "no"
148+
else:
149+
return "not needed"
135150

136151
def main():
137152
file_paths = changed_files()
@@ -151,6 +166,10 @@ def main():
151166
credit_given(special_files)
152167
# Misc/NEWS changed.
153168
reported_news(special_files)
169+
# Regenerated configure, if necessary.
170+
regenerated_configure(file_paths)
171+
# Regenerated pyconfig.h.in, if necessary.
172+
regenerated_pyconfig_h_in(file_paths)
154173

155174
# Test suite run and passed.
156175
if python_files or c_files:

0 commit comments

Comments
 (0)