[bumpversion]
-current_version = 49.0.0
+current_version = 49.0.1
commit = True
tag = True
+v49.0.1
+-------
+
+* #2228: Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file.
+
+
v49.0.0
-------
[metadata]
name = setuptools
-version = 49.0.0
+version = 49.0.1
description = Easily download, build, install, upgrade, and uninstall Python packages
author = Python Packaging Authority
author_email = distutils-sig@python.org
env = dict(os.environ,
MACOSX_DEPLOYMENT_TARGET=cur_target)
- proc = subprocess.Popen(cmd, env=env)
- proc.wait()
- exitcode = proc.returncode
+ 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
if exitcode:
if not DEBUG:
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)