Skip to content

Commit

Permalink
Restore location of 'enabled'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 8, 2020
1 parent 48a17a5 commit 6b70fb2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions _distutils_hack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
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
Expand All @@ -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')
Expand Down

0 comments on commit 6b70fb2

Please sign in to comment.