summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_distutils_hack/__init__.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py
index a10af2cc..71fa7ce1 100644
--- a/_distutils_hack/__init__.py
+++ b/_distutils_hack/__init__.py
@@ -8,14 +8,6 @@ import warnings
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():
if 'distutils' not in sys.modules:
return
@@ -38,6 +30,14 @@ def clear_distutils():
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():
clear_distutils()
distutils = importlib.import_module('setuptools._distutils')