Skip to content

Commit

Permalink
Merge pull request #2896 from pypa/feature/local-distutils
Browse files Browse the repository at this point in the history
Restore local distutils as the default.
  • Loading branch information
jaraco authored Dec 20, 2021
2 parents ed23173 + 42b51eb commit f7a55da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _distutils_hack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def enabled():
"""
Allow selection of distutils by environment variable.
"""
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib')
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
return which == 'local'


Expand Down
1 change: 1 addition & 0 deletions changelog.d/2896.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Setuptools once again makes its local copy of distutils the default. To override, set SETUPTOOLS_USE_DISTUTILS=stdlib.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class install_with_pth(install):
_pth_contents = textwrap.dedent("""
import os
var = 'SETUPTOOLS_USE_DISTUTILS'
enabled = os.environ.get(var, 'stdlib') == 'local'
enabled = os.environ.get(var, 'local') == 'local'
enabled and __import__('_distutils_hack').add_shim()
""").lstrip().replace('\n', '; ')

Expand Down

0 comments on commit f7a55da

Please sign in to comment.