Skip to content

Commit 0eefa82

Browse files
committed
Avoid private _config_vars
1 parent 569fd7b commit 0eefa82

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

setuptools/_distutils/tests/test_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def environment(monkeypatch):
3333
monkeypatch.setattr(os.path, 'join', os.path.join)
3434
monkeypatch.setattr(os.path, 'isabs', os.path.isabs)
3535
monkeypatch.setattr(os.path, 'splitdrive', os.path.splitdrive)
36-
monkeypatch.setattr(sysconfig, '_config_vars', copy(sysconfig._config_vars))
36+
monkeypatch.setattr(sysconfig, 'get_config_vars', sysconfig.get_config_vars)
3737

3838

3939
@pytest.mark.usefixtures('save_env')

setuptools/command/build_ext.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from distutils.command.build_ext import build_ext as _du_build_ext
1010
from distutils.ccompiler import new_compiler
11-
from distutils.sysconfig import customize_compiler, get_config_var
11+
from distutils.sysconfig import customize_compiler, get_config_var, get_config_vars
1212
from distutils import log
1313

1414
from setuptools.errors import BaseError
@@ -26,7 +26,8 @@
2626

2727
# make sure _config_vars is initialized
2828
get_config_var("LDSHARED")
29-
from distutils.sysconfig import _config_vars as _CONFIG_VARS # noqa
29+
30+
_CONFIG_VARS = get_config_vars()
3031

3132

3233
def _customize_compiler_for_shlib(compiler):

0 commit comments

Comments
 (0)