bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implement… · python/cpython@90d02e5 (original) (raw)
15 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1452,6 +1452,8 @@ name. | ||
1452 | 1452 | |
1453 | 1453 | .. module:: distutils.sysconfig |
1454 | 1454 | :synopsis: Low-level access to configuration information of the Python interpreter. |
1455 | +.. deprecated:: 3.10 | |
1456 | +:mod:`distutils.sysconfig` has been merged into :mod:`sysconfig`. | |
1455 | 1457 | .. moduleauthor:: Fred L. Drake, Jr. fdrake@acm.org |
1456 | 1458 | .. moduleauthor:: Greg Ward gward@python.net |
1457 | 1459 | .. sectionauthor:: Fred L. Drake, Jr. fdrake@acm.org |
@@ -1510,6 +1512,9 @@ for other parts of the :mod:`distutils` package. | ||
1510 | 1512 | meaning for other platforms will vary. The file is a platform-specific text |
1511 | 1513 | file, if it exists. This function is only useful on POSIX platforms. |
1512 | 1514 | |
1515 | +The following functions are deprecated together with this module and they | |
1516 | +have no direct replacement. | |
1517 | + | |
1513 | 1518 | |
1514 | 1519 | .. function:: get_python_inc([plat_specific[, prefix]]) |
1515 | 1520 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -224,6 +224,7 @@ Other functions | ||
224 | 224 | |
225 | 225 | Return the path of :file:`Makefile`. |
226 | 226 | |
227 | + | |
227 | 228 | Using :mod:`sysconfig` as a script |
228 | 229 | ---------------------------------- |
229 | 230 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4,6 +4,7 @@ | ||
4 | 4 | modules in setup scripts.""" |
5 | 5 | |
6 | 6 | import os |
7 | +import re | |
7 | 8 | import warnings |
8 | 9 | |
9 | 10 | # This class is really only used by the "build_ext" command, so it might |
@@ -161,7 +162,7 @@ def read_setup_file(filename): | ||
161 | 162 | line = file.readline() |
162 | 163 | if line is None: # eof |
163 | 164 | break |
164 | -if _variable_rx.match(line): # VAR=VALUE, handled in first pass | |
165 | +if re.match(_variable_rx, line): # VAR=VALUE, handled in first pass | |
165 | 166 | continue |
166 | 167 | |
167 | 168 | if line[0] == line[-1] == "*": |