diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2013-07-22 00:57:44 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2013-07-22 00:57:44 (GMT) |
commit | 6e2711b345faf85c49eed979a41f9e74f7d2151e (patch) | |
tree | 71d1908c1f7e33fc4ff3f73d4fefc2fed94f73f8 /Tools/scripts/patchcheck.py | |
parent | 43d82df406114223c70961f0774d622536a0629d (diff) | |
download | cpython-6e2711b345faf85c49eed979a41f9e74f7d2151e.zip cpython-6e2711b345faf85c49eed979a41f9e74f7d2151e.tar.gz cpython-6e2711b345faf85c49eed979a41f9e74f7d2151e.tar.bz2 |
Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
Diffstat (limited to 'Tools/scripts/patchcheck.py')
-rwxr-xr-x | Tools/scripts/patchcheck.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py index 7b8857e..6f9821b 100755 --- a/Tools/scripts/patchcheck.py +++ b/Tools/scripts/patchcheck.py @@ -124,13 +124,13 @@ def docs_modified(file_paths): @status("Misc/ACKS updated", modal=True) def credit_given(file_paths): """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) def reported_news(file_paths): """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) def regenerated_configure(file_paths): @@ -153,7 +153,8 @@ def main(): 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'))] 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. normalize_whitespace(python_files) # C rules enforcement. @@ -163,9 +164,9 @@ def main(): # Docs updated. docs_modified(doc_files) # Misc/ACKS changed. - credit_given(special_files) + credit_given(misc_files) # Misc/NEWS changed. - reported_news(special_files) + reported_news(misc_files) # Regenerated configure, if necessary. regenerated_configure(file_paths) # Regenerated pyconfig.h.in, if necessary. |