diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-08-08 13:38:56 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-08-08 19:48:50 -0400 |
| commit | 6b70fb201d6a81448de6ca6f71d7091b9a26096c (patch) | |
| tree | 36a24f8473d9a37fa8a8c044796f52268847a099 /_distutils_hack | |
| parent | 48a17a56ecfc77fb60780e3cfa75390f6bb10b15 (diff) | |
| download | python-setuptools-git-6b70fb201d6a81448de6ca6f71d7091b9a26096c.tar.gz | |
Restore location of 'enabled'
Diffstat (limited to '_distutils_hack')
| -rw-r--r-- | _distutils_hack/__init__.py | 16 |
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') |
