diff Tools/scripts/patchcheck.py @ 84773:26686d227e41 3.3

Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
author Terry Jan Reedy <tjreedy@udel.edu>
date Sun, 21 Jul 2013 20:57:44 -0400
parents d3374d393975
children
line wrap: on
line diff
--- a/Tools/scripts/patchcheck.py	Sun Jul 21 23:05:04 2013 +0200
+++ b/Tools/scripts/patchcheck.py	Sun Jul 21 20:57:44 2013 -0400
@@ -124,13 +124,13 @@
 @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 @@
     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 @@
     # 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.