diff options
-rw-r--r-- | changelog.d/2232.breaking.rst | 2 | ||||
-rw-r--r-- | setuptools/tests/test_virtualenv.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/2232.breaking.rst b/changelog.d/2232.breaking.rst index b2fd926f..b5a3c7e8 100644 --- a/changelog.d/2232.breaking.rst +++ b/changelog.d/2232.breaking.rst @@ -1 +1 @@ -Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed. +Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed. Due to pip #8761, it is currently necessary to invoke this escape hatch when upgrading setuptools. diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 555273ae..8b7a8b4e 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -119,6 +119,9 @@ def test_pip_upgrade_from_source(pip_version, virtualenv): wheel = glob.glob(os.path.join(dist_dir, '*.whl'))[0] # Then update from wheel. virtualenv.run('pip install ' + wheel) + # As reported in pypa/pip#8761, pip cannot handle an upgrade when + # setuptools supplies distutils. + virtualenv.env['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib' # And finally try to upgrade from source. virtualenv.run('pip install --no-cache-dir --upgrade ' + sdist) |