diff options
author | Victor Stinner <vstinner@python.org> | 2022-11-03 18:27:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 18:27:27 (GMT) |
commit | 0faa0ba240e815614e5a2900e48007acac41b214 (patch) | |
tree | 20b8346df4331716aba051d6e05e039318176ba3 /PC | |
parent | b07f546ea3a574bc3016fb023c157c65a47f4849 (diff) | |
download | cpython-0faa0ba240e815614e5a2900e48007acac41b214.zip cpython-0faa0ba240e815614e5a2900e48007acac41b214.tar.gz cpython-0faa0ba240e815614e5a2900e48007acac41b214.tar.bz2 |
gh-92584: Remove the distutils package (#99061)
Remove the distutils package. It was deprecated in Python 3.10 by PEP
632 "Deprecate distutils module". For projects still using distutils
and cannot be updated to something else, the setuptools project can
be installed: it still provides distutils.
* Remove Lib/distutils/ directory
* Remove test_distutils
* Remove references to distutils
* Skip test_check_c_globals and test_peg_generator since they use
distutils
Diffstat (limited to 'PC')
-rw-r--r-- | PC/layout/support/options.py | 4 | ||||
-rw-r--r-- | PC/layout/support/props.py | 2 | ||||
-rw-r--r-- | PC/layout/support/python.props | 6 |
3 files changed, 2 insertions, 10 deletions
diff --git a/PC/layout/support/options.py b/PC/layout/support/options.py index 3d93e89..26d13f5 100644 --- a/PC/layout/support/options.py +++ b/PC/layout/support/options.py @@ -18,7 +18,6 @@ OPTIONS = { "stable": {"help": "stable ABI stub"}, "pip": {"help": "pip"}, "pip-user": {"help": "pip.ini file for default --user"}, - "distutils": {"help": "distutils"}, "tcltk": {"help": "Tcl, Tk and tkinter"}, "idle": {"help": "Idle"}, "tests": {"help": "test suite"}, @@ -43,7 +42,6 @@ PRESETS = { "stable", "pip", "pip-user", - "distutils", "tcltk", "idle", "venv", @@ -59,7 +57,6 @@ PRESETS = { "dev", "pip", "stable", - "distutils", "venv", "props", "nuspec", @@ -71,7 +68,6 @@ PRESETS = { "options": [ "stable", "pip", - "distutils", "tcltk", "idle", "tests", diff --git a/PC/layout/support/props.py b/PC/layout/support/props.py index 1eb9b7c..c7a7a0c 100644 --- a/PC/layout/support/props.py +++ b/PC/layout/support/props.py @@ -36,7 +36,6 @@ PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?> <PythonVersion>{PYTHON_VERSION}</PythonVersion> <IncludePythonExe Condition="$(IncludePythonExe) == ''">true</IncludePythonExe> - <IncludeDistutils Condition="$(IncludeDistutils) == ''">false</IncludeDistutils> <IncludeLib2To3 Condition="$(IncludeLib2To3) == ''">false</IncludeLib2To3> <IncludeVEnv Condition="$(IncludeVEnv) == ''">false</IncludeVEnv> @@ -68,7 +67,6 @@ PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?> <Link>DLLs\%(Filename)%(Extension)</Link> </_PythonRuntimeDlls> <_PythonRuntimeLib Include="$(PythonHome)\Lib\**\*" Exclude="$(PythonHome)\Lib\**\*.pyc;$(PythonHome)\Lib\site-packages\**\*" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\distutils\**\*" Condition="$(IncludeDistutils) != 'true'" /> <_PythonRuntimeLib Remove="$(PythonHome)\Lib\lib2to3\**\*" Condition="$(IncludeLib2To3) != 'true'" /> <_PythonRuntimeLib Remove="$(PythonHome)\Lib\ensurepip\**\*" Condition="$(IncludeVEnv) != 'true'" /> <_PythonRuntimeLib Remove="$(PythonHome)\Lib\venv\**\*" Condition="$(IncludeVEnv) != 'true'" /> diff --git a/PC/layout/support/python.props b/PC/layout/support/python.props index 4cc7008..e46891a 100644 --- a/PC/layout/support/python.props +++ b/PC/layout/support/python.props @@ -6,9 +6,8 @@ <PythonLibs>$(PythonHome)\libs</PythonLibs> <PythonTag>$$PYTHON_TAG$$</PythonTag> <PythonVersion>$$PYTHON_VERSION$$</PythonVersion> - + <IncludePythonExe Condition="$(IncludePythonExe) == ''">true</IncludePythonExe> - <IncludeDistutils Condition="$(IncludeDistutils) == ''">false</IncludeDistutils> <IncludeLib2To3 Condition="$(IncludeLib2To3) == ''">false</IncludeLib2To3> <IncludeVEnv Condition="$(IncludeVEnv) == ''">false</IncludeVEnv> @@ -41,7 +40,6 @@ <Link>DLLs\%(Filename)%(Extension)</Link> </_PythonRuntimeDlls> <_PythonRuntimeLib Include="$(PythonHome)\Lib\**\*" Exclude="$(PythonHome)\Lib\**\*.pyc;$(PythonHome)\Lib\site-packages\**\*" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\distutils\**\*" Condition="$(IncludeDistutils) != 'true'" /> <_PythonRuntimeLib Remove="$(PythonHome)\Lib\lib2to3\**\*" Condition="$(IncludeLib2To3) != 'true'" /> <_PythonRuntimeLib Remove="$(PythonHome)\Lib\ensurepip\**\*" Condition="$(IncludeVEnv) != 'true'" /> <_PythonRuntimeLib Remove="$(PythonHome)\Lib\venv\**\*" Condition="$(IncludeVEnv) != 'true'" /> @@ -50,7 +48,7 @@ </_PythonRuntimeLib> <PythonRuntime Include="@(_PythonRuntimeExe);@(_PythonRuntimeDlls);@(_PythonRuntimeLib)" /> </ItemGroup> - + <Message Importance="low" Text="Collected Python runtime from $(PythonHome):%0D%0A@(PythonRuntime->' %(Link)','%0D%0A')" /> </Target> </Project> |