From 0f0648fc1c8428ff4cdd56109fe7b9f3bc0d3609 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 28 Dec 2020 11:30:43 +0900 Subject: [PATCH] Imported Upstream version 49.1.0 --- .bumpversion.cfg | 2 +- CHANGES.rst | 4 ++-- conftest.py | 1 + setup.cfg | 2 +- setuptools/__init__.py | 3 ++- setuptools/_distutils/spawn.py | 12 +++--------- setuptools/_distutils/tests/test_spawn.py | 5 ----- 7 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 87d756b..f2f2b27 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 49.0.1 +current_version = 49.1.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a38b610..26586fb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ -v49.0.1 +v49.1.0 ------- -* #2228: Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file. +* #2228: Disabled distutils adoption for now while emergent issues are addressed. v49.0.0 diff --git a/conftest.py b/conftest.py index 72edcf1..50cc650 100644 --- a/conftest.py +++ b/conftest.py @@ -15,6 +15,7 @@ collect_ignore = [ 'tests/manual_test.py', 'setuptools/tests/mod_with_constant.py', 'setuptools/_distutils', + 'setuptools/distutils_patch.py', ] diff --git a/setup.cfg b/setup.cfg index c9d108c..1f347c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ formats = zip [metadata] name = setuptools -version = 49.0.1 +version = 49.1.0 description = Easily download, build, install, upgrade, and uninstall Python packages author = Python Packaging Authority author_email = distutils-sig@python.org diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 7a1f9f4..a6cbe13 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -3,7 +3,8 @@ import os import functools -import setuptools.distutils_patch # noqa: F401 +# Disabled for now due to: #2228, #2230 +# import setuptools.distutils_patch # noqa: F401 import distutils.core import distutils.filelist diff --git a/setuptools/_distutils/spawn.py b/setuptools/_distutils/spawn.py index 0d1bd03..aad277b 100644 --- a/setuptools/_distutils/spawn.py +++ b/setuptools/_distutils/spawn.py @@ -71,15 +71,9 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): env = dict(os.environ, MACOSX_DEPLOYMENT_TARGET=cur_target) - try: - proc = subprocess.Popen(cmd, env=env) - proc.wait() - exitcode = proc.returncode - except OSError as exc: - if not DEBUG: - cmd = cmd[0] - raise DistutilsExecError( - "command %r failed: %s" % (cmd, exc.args[-1])) from exc + proc = subprocess.Popen(cmd, env=env) + proc.wait() + exitcode = proc.returncode if exitcode: if not DEBUG: diff --git a/setuptools/_distutils/tests/test_spawn.py b/setuptools/_distutils/tests/test_spawn.py index 704019a..919d0ad 100644 --- a/setuptools/_distutils/tests/test_spawn.py +++ b/setuptools/_distutils/tests/test_spawn.py @@ -126,11 +126,6 @@ class SpawnTestCase(support.TempdirManager, rv = find_executable(program) self.assertEqual(rv, filename) - def test_spawn_missing_exe(self): - with self.assertRaises(DistutilsExecError) as ctx: - spawn(['does-not-exist']) - assert 'command does-no-exist failed' in str(ctx) - def test_suite(): return unittest.makeSuite(SpawnTestCase) -- 2.7.4