Imported Upstream version 50.1.0 upstream/50.1.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:08:46 +0000 (07:08 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:08:46 +0000 (07:08 +0900)
.bumpversion.cfg
CHANGES.rst
_distutils_hack/__init__.py
azure-pipelines.yml
setup.cfg
setup.py
setuptools/tests/test_distutils_adoption.py

index e85c79bbc6965007e0ab66f74b085600052c0428..34b34fde913f3aca8913c00bcc8c5034f4a4b34c 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 50.0.3
+current_version = 50.1.0
 commit = True
 tag = True
 
index 8f192618c755df6ec940f82e5596ceb1e68ea11f..a00d827191cedb102c0e2d55adaa8f5c55367ed6 100644 (file)
@@ -1,3 +1,9 @@
+v50.1.0
+-------
+
+* #2350: 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.
+
+
 v50.0.3
 -------
 
index 2bc6df7ac7589c3c0725553ff58cba2a3f7bc883..3325817bcaea27ab6817f2e310116ec7e5c0ce8b 100644 (file)
@@ -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'
 
 
index ee772682ab4088bb2f1b1983393026cb13fa5eb5..4567b9b04398490c1ad2c252ba4667eb46827b07 100644 (file)
@@ -76,6 +76,7 @@ stages:
       env:
         TWINE_PASSWORD: $(PyPI-token)
         TIDELIFT_TOKEN: $(Tidelift-token)
+        GITHUB_TOKEN: $(Github-token)
       displayName: 'publish to PyPI'
 
   condition: contains(variables['Build.SourceBranch'], 'tags')
index 7236ae40f7298e3828bb4b7b41f13a5edfa0a7de..692eb1fe880dd43be2f633b4582be6876e25ba55 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,7 +16,7 @@ formats = zip
 
 [metadata]
 name = setuptools
-version = 50.0.3
+version = 50.1.0
 description = Easily download, build, install, upgrade, and uninstall Python packages
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
index 34654e19fce531ef4d1d2064a9cd6812dac7ccb4..2bd48daa675c956c6e850816c50fe190b1886835 100755 (executable)
--- 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', '; ')
 
index 8edd3f9b44ead09a1c94d0874c985b34911444e9..a53773df8cb36ced584f116f20f95f20c7305c04 100644 (file)
@@ -56,7 +56,8 @@ def test_distutils_local_with_setuptools(venv):
     """
     Ensure local distutils is used when appropriate.
     """
-    loc = find_distutils(venv, imports='setuptools, distutils', env=dict())
+    env = dict(SETUPTOOLS_USE_DISTUTILS='local')
+    loc = find_distutils(venv, imports='setuptools, distutils', env=env)
     assert venv.name in loc.split(os.sep)
 
 
@@ -66,4 +67,5 @@ def test_distutils_local(venv):
     Even without importing, the setuptools-local copy of distutils is
     preferred.
     """
-    assert venv.name in find_distutils(venv, env=dict()).split(os.sep)
+    env = dict(SETUPTOOLS_USE_DISTUTILS='local')
+    assert venv.name in find_distutils(venv, env=env).split(os.sep)