diff options
author | Victor Stinner <vstinner@python.org> | 2022-10-12 08:09:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 08:09:21 (GMT) |
commit | 0895c2a066c64c84cab0821886dfa66efc1bdc2f (patch) | |
tree | f2371b25cdbf64201c90316f03370f5d0000fe6e | |
parent | c39a0c335486fa8eac0f3030930f9e8769118a4f (diff) | |
download | cpython-0895c2a066c64c84cab0821886dfa66efc1bdc2f.zip cpython-0895c2a066c64c84cab0821886dfa66efc1bdc2f.tar.gz cpython-0895c2a066c64c84cab0821886dfa66efc1bdc2f.tar.bz2 |
gh-97669: Create Tools/patchcheck/ directory (#98186)
Move patchcheck.py, reindent.py and untabify.py scripts to a new
Tools/patchcheck/ directory.
-rw-r--r-- | .azure-pipelines/posix-steps.yml | 2 | ||||
-rw-r--r-- | Lib/test/test_tools/test_reindent.py | 4 | ||||
-rw-r--r-- | Makefile.pre.in | 4 | ||||
-rwxr-xr-x | Tools/patchcheck/patchcheck.py (renamed from Tools/scripts/patchcheck.py) | 0 | ||||
-rwxr-xr-x | Tools/patchcheck/reindent.py (renamed from Tools/scripts/reindent.py) | 0 | ||||
-rwxr-xr-x | Tools/patchcheck/untabify.py (renamed from Tools/scripts/untabify.py) | 0 | ||||
-rw-r--r-- | Tools/scripts/README | 3 |
7 files changed, 5 insertions, 8 deletions
diff --git a/.azure-pipelines/posix-steps.yml b/.azure-pipelines/posix-steps.yml index 29b43e0..9d7c5e1 100644 --- a/.azure-pipelines/posix-steps.yml +++ b/.azure-pipelines/posix-steps.yml @@ -68,7 +68,7 @@ steps: - ${{ if eq(parameters.patchcheck, 'true') }}: - script: | git fetch origin - ./python Tools/scripts/patchcheck.py --ci true + ./python Tools/patchcheck/patchcheck.py --ci true displayName: 'Run patchcheck.py' condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) diff --git a/Lib/test/test_tools/test_reindent.py b/Lib/test/test_tools/test_reindent.py index 34df0c5..3b0c793 100644 --- a/Lib/test/test_tools/test_reindent.py +++ b/Lib/test/test_tools/test_reindent.py @@ -9,12 +9,12 @@ import unittest from test.support.script_helper import assert_python_ok from test.support import findfile -from test.test_tools import scriptsdir, skip_if_missing +from test.test_tools import toolsdir, skip_if_missing skip_if_missing() class ReindentTests(unittest.TestCase): - script = os.path.join(scriptsdir, 'reindent.py') + script = os.path.join(toolsdir, 'patchcheck', 'reindent.py') def test_noargs(self): assert_python_ok(self.script) diff --git a/Makefile.pre.in b/Makefile.pre.in index 4602db6..7e25671 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2386,7 +2386,7 @@ Python/dtoa.o: Python/dtoa.c # Run reindent on the library reindent: - ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib + ./$(BUILDPYTHON) $(srcdir)/Tools/patchcheck/reindent.py -r $(srcdir)/Lib # Rerun configure with the same options as it was run last time, # provided the config.status script exists @@ -2546,7 +2546,7 @@ funny: # Perform some verification checks on any modified files. patchcheck: all - $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/patchcheck/patchcheck.py check-limited-abi: all $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --all $(srcdir)/Misc/stable_abi.toml diff --git a/Tools/scripts/patchcheck.py b/Tools/patchcheck/patchcheck.py index a324eaf..a324eaf 100755 --- a/Tools/scripts/patchcheck.py +++ b/Tools/patchcheck/patchcheck.py diff --git a/Tools/scripts/reindent.py b/Tools/patchcheck/reindent.py index f6dadaa..f6dadaa 100755 --- a/Tools/scripts/reindent.py +++ b/Tools/patchcheck/reindent.py diff --git a/Tools/scripts/untabify.py b/Tools/patchcheck/untabify.py index 861c83c..861c83c 100755 --- a/Tools/scripts/untabify.py +++ b/Tools/patchcheck/untabify.py diff --git a/Tools/scripts/README b/Tools/scripts/README index 9943d4c..b952268 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -5,9 +5,6 @@ useful while building, extending or managing Python. combinerefs.py A helper for analyzing PYTHONDUMPREFS output idle3 Main program to start IDLE parse_html5_entities.py Utility for parsing HTML5 entity definitions -patchcheck.py Perform common checks and cleanup before committing pydoc3 Python documentation browser -reindent.py Change .py files to use 4-space indents run_tests.py Run the test suite with more sensible default options stable_abi.py Stable ABI checks and file generators. -untabify.py Replace tabs with spaces in argument files |