Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
aff64ae8
Commit
aff64ae8
authored
Jul 05, 2020
by
Jason R. Coombs
Committed by
GitHub
Jul 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2236 from pypa/bugfix/2228-spawn-missing
Restore support for spawn when compiler is missing
parents
5e179ffc
d61166f0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
CHANGES.rst
CHANGES.rst
+6
-0
setuptools/_distutils/spawn.py
setuptools/_distutils/spawn.py
+9
-3
setuptools/_distutils/tests/test_spawn.py
setuptools/_distutils/tests/test_spawn.py
+5
-0
No files found.
CHANGES.rst
View file @
aff64ae8
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
.1.0
-------
...
...
setuptools/_distutils/spawn.py
View file @
aff64ae8
...
...
@@ -71,9 +71,15 @@ 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
if
exitcode
:
if
not
DEBUG
:
...
...
setuptools/_distutils/tests/test_spawn.py
View file @
aff64ae8
...
...
@@ -126,6 +126,11 @@ 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment