]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-97669: Create Tools/patchcheck/ directory (#98186)
authorVictor Stinner <vstinner@python.org>
Wed, 12 Oct 2022 08:09:21 +0000 (10:09 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2022 08:09:21 +0000 (10:09 +0200)
Move patchcheck.py, reindent.py and untabify.py scripts to a new
Tools/patchcheck/ directory.

.azure-pipelines/posix-steps.yml
Lib/test/test_tools/test_reindent.py
Makefile.pre.in
Tools/patchcheck/patchcheck.py [moved from Tools/scripts/patchcheck.py with 100% similarity]
Tools/patchcheck/reindent.py [moved from Tools/scripts/reindent.py with 100% similarity]
Tools/patchcheck/untabify.py [moved from Tools/scripts/untabify.py with 100% similarity]
Tools/scripts/README

index 29b43e0934472ea149370790e94cdb0b0398a0cf..9d7c5e1279f46da1894cbd780be0eac848b77398 100644 (file)
@@ -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'))
 
index 34df0c5d5119047dee35300b746144618f33572d..3b0c793a38e4daba9eec7cb1246374b3dc30c567 100644 (file)
@@ -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)
index 4602db69d15af9c575b5e6d7e5a2de8ae65b0409..7e2567173bc2ce989c7883dda74d2b4d5ad6591e 100644 (file)
@@ -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
index 9943d4c42fc4280fc55d27a65f991870ab8d4d55..b952268159590192e39cbb6b03b2cb1dc0bb1694 100644 (file)
@@ -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