Imported Upstream version 49.1.2 upstream/49.1.2
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:07:12 +0000 (07:07 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:07:12 +0000 (07:07 +0900)
.bumpversion.cfg
CHANGES.rst
setup.cfg
setuptools/__init__.py
setuptools/distutils_patch.py

index 55f806f90bb829b1c584e3e413ba8e79a9f05fbf..30e83be1e00c1b64fe2639e2c942ce72cefd5f26 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 49.1.1
+current_version = 49.1.2
 commit = True
 tag = True
 
index d5a2a70345f4083d1320c69edbcf298a6cc9e65f..24837a9772cff2e8cf380ea3dd1825effaa3619a 100644 (file)
@@ -1,3 +1,9 @@
+v49.1.2
+-------
+
+* #2232: In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used.
+
+
 v49.1.1
 -------
 
index 3151fa499ed104e292383fa4312760a711c5e6a0..dc29f7b1abd331c2d54b927cae06007a53df507c 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,7 +16,7 @@ formats = zip
 
 [metadata]
 name = setuptools
-version = 49.1.1
+version = 49.1.2
 description = Easily download, build, install, upgrade, and uninstall Python packages
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
index a6cbe1322ae8de50a059c1aa872312218e3275c8..8388251115d2fd2dd5e83722904feea6003f6162 100644 (file)
@@ -4,7 +4,7 @@ import os
 import functools
 
 # Disabled for now due to: #2228, #2230
-import setuptools.distutils_patch  # noqa: F401
+import setuptools.distutils_patch  # noqa: F401
 
 import distutils.core
 import distutils.filelist
index b2095fbac730b7f80417ad47fb766e7bf6bc8e33..c5f273dd4d5c4ab80aeb7704820e7b2abb69623d 100644 (file)
@@ -7,6 +7,7 @@ for more motivation.
 
 import sys
 import re
+import os
 import importlib
 import warnings
 
@@ -20,6 +21,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')
@@ -31,4 +40,5 @@ def ensure_local_distutils():
     assert '_distutils' in core.__file__, core.__file__
 
 
-ensure_local_distutils()
+if enabled():
+    ensure_local_distutils()