Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.

This commit is contained in:
Terry Jan Reedy 2013-07-21 20:57:44 -04:00
parent 43d82df406
commit 6e2711b345
2 changed files with 8 additions and 5 deletions

View File

@ -242,6 +242,8 @@ Documentation
Tools/Demos Tools/Demos
----------- -----------
- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
- Issue #18448: Fix a typo in Tools/demo/eiffel.py. - Issue #18448: Fix a typo in Tools/demo/eiffel.py.
- Issue #18457: Fixed saving of formulas and complex numbers in - Issue #18457: Fixed saving of formulas and complex numbers in

View File

@ -124,13 +124,13 @@ def docs_modified(file_paths):
@status("Misc/ACKS updated", modal=True) @status("Misc/ACKS updated", modal=True)
def credit_given(file_paths): def credit_given(file_paths):
"""Check if Misc/ACKS has been changed.""" """Check if Misc/ACKS has been changed."""
return 'Misc/ACKS' in file_paths return os.path.join('Misc', 'ACKS') in file_paths
@status("Misc/NEWS updated", modal=True) @status("Misc/NEWS updated", modal=True)
def reported_news(file_paths): def reported_news(file_paths):
"""Check if Misc/NEWS has been changed.""" """Check if Misc/NEWS has been changed."""
return 'Misc/NEWS' in file_paths return os.path.join('Misc', 'NEWS') in file_paths
@status("configure regenerated", modal=True, info=str) @status("configure regenerated", modal=True, info=str)
def regenerated_configure(file_paths): def regenerated_configure(file_paths):
@ -153,7 +153,8 @@ def main():
python_files = [fn for fn in file_paths if fn.endswith('.py')] python_files = [fn for fn in file_paths if fn.endswith('.py')]
c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))] c_files = [fn for fn in file_paths if fn.endswith(('.c', '.h'))]
doc_files = [fn for fn in file_paths if fn.startswith('Doc')] doc_files = [fn for fn in file_paths if fn.startswith('Doc')]
special_files = {'Misc/ACKS', 'Misc/NEWS'} & set(file_paths) misc_files = {os.path.join('Misc', 'ACKS'), os.path.join('Misc', 'NEWS')}\
& set(file_paths)
# PEP 8 whitespace rules enforcement. # PEP 8 whitespace rules enforcement.
normalize_whitespace(python_files) normalize_whitespace(python_files)
# C rules enforcement. # C rules enforcement.
@ -163,9 +164,9 @@ def main():
# Docs updated. # Docs updated.
docs_modified(doc_files) docs_modified(doc_files)
# Misc/ACKS changed. # Misc/ACKS changed.
credit_given(special_files) credit_given(misc_files)
# Misc/NEWS changed. # Misc/NEWS changed.
reported_news(special_files) reported_news(misc_files)
# Regenerated configure, if necessary. # Regenerated configure, if necessary.
regenerated_configure(file_paths) regenerated_configure(file_paths)
# Regenerated pyconfig.h.in, if necessary. # Regenerated pyconfig.h.in, if necessary.