Skip to content

bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation of the PEP) #23142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9de38bb
Mark distutils.sysconfig as deprecated
frenzymadness Oct 15, 2020
2f73368
Import global paths from sysconfig module
frenzymadness Oct 15, 2020
43d810e
Move some similar functions from distutils.sysconfig -> sysconfig
frenzymadness Oct 15, 2020
2ca4dfd
Move the rest of global variables
frenzymadness Oct 15, 2020
09f2617
Move the rest of functions to sysconfig
frenzymadness Oct 15, 2020
24e0584
Import regexes used in tests
frenzymadness Oct 16, 2020
b9ee651
Implement compatibility option for parse_makefile
frenzymadness Oct 16, 2020
12f92cf
Do not use assignment in teardown to not lose reference to global dict
frenzymadness Oct 19, 2020
7b9b0c1
Ignore DeprecationWarning in pip code in ensurepip module
frenzymadness Oct 20, 2020
6f5aa4f
Improve setUp/tearDown of UnixCCompilerTestCase
frenzymadness Oct 20, 2020
fca8adc
Improve or create setUp/tearDown methods for tests where sysconfig._C…
frenzymadness Oct 21, 2020
318428d
Rename `distutils_compat` to `keep_unresolved` and reverse the logic
frenzymadness Oct 23, 2020
6136978
Merge all import from sysconfig to one statement
frenzymadness Oct 23, 2020
e635dbd
Allow import of sysconfig when re module is not available
frenzymadness Oct 23, 2020
d8a8cf0
Add a TODO comment about PEP 632
frenzymadness Oct 23, 2020
e317db5
Mark distutils.sysconfig as deprecated in docs
frenzymadness Oct 23, 2020
17206f0
Copy docs for get_python_inc and get_python_lib from distutils.syscon…
frenzymadness Oct 23, 2020
04ef7af
Move customize_compiler back to distutils.sysconfig as it'll be remov…
frenzymadness Oct 24, 2020
6015255
Fix import of not-yet-initialized _CONFIG_VARS
frenzymadness Nov 3, 2020
abc310b
Switch global vars from regex objects to raw strings and import re on…
frenzymadness Nov 5, 2020
17aa9c4
Move get_python_lib and get_python_inc back to distutils.sysconfig
frenzymadness Nov 13, 2020
be181b6
News entry
frenzymadness Feb 15, 2021
e253a3d
Restore build_flags accidentally removed during a rebase
frenzymadness Apr 16, 2021
cd8e387
Update Doc/distutils/apiref.rst
frenzymadness Apr 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,8 @@ name.

.. module:: distutils.sysconfig
:synopsis: Low-level access to configuration information of the Python interpreter.
.. deprecated:: 3.10
:mod:`distutils.sysconfig` has been merged into :mod:`sysconfig`.
.. moduleauthor:: Fred L. Drake, Jr. <[email protected]>
.. moduleauthor:: Greg Ward <[email protected]>
.. sectionauthor:: Fred L. Drake, Jr. <[email protected]>
Expand Down Expand Up @@ -1510,6 +1512,9 @@ for other parts of the :mod:`distutils` package.
meaning for other platforms will vary. The file is a platform-specific text
file, if it exists. This function is only useful on POSIX platforms.

The following functions are deprecated together with this module and they
have no direct replacement.


.. function:: get_python_inc([plat_specific[, prefix]])

Expand Down
1 change: 1 addition & 0 deletions Doc/library/sysconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ Other functions

Return the path of :file:`Makefile`.


Using :mod:`sysconfig` as a script
----------------------------------

Expand Down
3 changes: 2 additions & 1 deletion Lib/distutils/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
modules in setup scripts."""

import os
import re
import warnings

# This class is really only used by the "build_ext" command, so it might
Expand Down Expand Up @@ -161,7 +162,7 @@ def read_setup_file(filename):
line = file.readline()
if line is None: # eof
break
if _variable_rx.match(line): # VAR=VALUE, handled in first pass
if re.match(_variable_rx, line): # VAR=VALUE, handled in first pass
continue

if line[0] == line[-1] == "*":
Expand Down
Loading