From 6b70fb201d6a81448de6ca6f71d7091b9a26096c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 8 Aug 2020 13:38:56 -0400 Subject: Restore location of 'enabled' --- _distutils_hack/__init__.py | 16 ++++++++-------- 1 file 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') -- cgit v1.2.3