Commit 6b70fb20 authored by Jason R. Coombs's avatar Jason R. Coombs

Restore location of 'enabled'

parent 48a17a56
...@@ -8,14 +8,6 @@ import warnings ...@@ -8,14 +8,6 @@ import warnings
is_pypy = '__pypy__' in sys.builtin_module_names is_pypy = '__pypy__' in sys.builtin_module_names
def enabled():
"""
Allow selection of distutils by environment variable.
"""
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib')
return which == 'local'
def warn_distutils_present(): def warn_distutils_present():
if 'distutils' not in sys.modules: if 'distutils' not in sys.modules:
return return
...@@ -38,6 +30,14 @@ def clear_distutils(): ...@@ -38,6 +30,14 @@ def clear_distutils():
del sys.modules[name] del sys.modules[name]
def enabled():
"""
Allow selection of distutils by environment variable.
"""
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib')
return which == 'local'
def ensure_local_distutils(): def ensure_local_distutils():
clear_distutils() clear_distutils()
distutils = importlib.import_module('setuptools._distutils') distutils = importlib.import_module('setuptools._distutils')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment