summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-09-02 17:41:38 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-09-02 17:41:38 -0400
commitc0085e87c69629ec3cf24dfce887c0fb93fa80dd (patch)
tree8e76c8663eb39a0210f3664b57d355f7cfd8e5c5
parent8eb9efac24a5bd7f964f6f09d142576f1b4a9e07 (diff)
downloadpython-setuptools-git-c0085e87c69629ec3cf24dfce887c0fb93fa80dd.tar.gz
Make stdlib distutils the default again. Stop the burning. Ref #2350 and others.
-rw-r--r--_distutils_hack/__init__.py2
-rw-r--r--changelog.d/2350.change.rst1
-rwxr-xr-xsetup.py2
3 files changed, 3 insertions, 2 deletions
diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py
index 2bc6df7a..3325817b 100644
--- a/_distutils_hack/__init__.py
+++ b/_distutils_hack/__init__.py
@@ -37,7 +37,7 @@ def enabled():
"""
Allow selection of distutils by environment variable.
"""
- which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
+ which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib')
return which == 'local'
diff --git a/changelog.d/2350.change.rst b/changelog.d/2350.change.rst
new file mode 100644
index 00000000..c06930e6
--- /dev/null
+++ b/changelog.d/2350.change.rst
@@ -0,0 +1 @@
+Setuptools reverts using the included distutils by default. Platform maintainers and system integrators and others are *strongly* encouraged to set ``SETUPTOOLS_USE_DISTUTILS=local`` to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment.
diff --git a/setup.py b/setup.py
index 34654e19..2bd48daa 100755
--- a/setup.py
+++ b/setup.py
@@ -100,7 +100,7 @@ class install_with_pth(install):
_pth_contents = textwrap.dedent("""
import os
var = 'SETUPTOOLS_USE_DISTUTILS'
- enabled = os.environ.get(var, 'local') == 'local'
+ enabled = os.environ.get(var, 'stdlib') == 'local'
enabled and __import__('_distutils_hack').add_shim()
""").lstrip().replace('\n', '; ')