Kaydet (Commit) 68ad1d13 authored tarafından Terry Jan Reedy's avatar Terry Jan Reedy

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

üst 2c636fd6
...@@ -137,6 +137,8 @@ Documentation ...@@ -137,6 +137,8 @@ Documentation
- Issue #17844: Refactor a documentation of Python specific encodings. - Issue #17844: Refactor a documentation of Python specific encodings.
Add links to encoders and decoders for binary-to-binary codecs. Add links to encoders and decoders for binary-to-binary codecs.
- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
What's New in Python 2.7.5? What's New in Python 2.7.5?
=========================== ===========================
......
...@@ -144,13 +144,13 @@ def docs_modified(file_paths): ...@@ -144,13 +144,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
def main(): def main():
...@@ -158,7 +158,8 @@ def main(): ...@@ -158,7 +158,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.
...@@ -168,9 +169,9 @@ def main(): ...@@ -168,9 +169,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)
# Test suite run and passed. # Test suite run and passed.
if python_files or c_files: if python_files or c_files:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment