Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cygwinccompiler: Split CC env var before passing to subprocess #80

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Dec 18, 2021

4113bc3 added support for clang by respecting the CC env variable.
The content of the env var gets passed to check_output() as the compiler
executable. But CC is not just a path to an executable but a command line,
such as "ccache gcc" which makes checkout_output() fail in those cases because
it will try to look for "ccache gcc" in PATH instead of "ccache".

To fix the issue use shlex to parse the command line before passing it to
check_output().

Co-authored-by: Christoph Reiter [email protected]
Signed-off-by: Naveen M K [email protected]

Part of #34

@lazka lazka force-pushed the fix-cc-command-line branch from cce5106 to 2e6d057 Compare December 18, 2021 07:08
4113bc3 added support for clang by respecting the CC env variable.
The content of the env var gets passed to check_output() as the compiler
executable. But CC is not just a path to an executable but a command line,
such as "ccache gcc" which makes checkout_output() fail in those cases because
it will try to look for "ccache gcc" in PATH instead of "ccache".

To fix the issue use shlex to parse the command line before passing it to
check_output().
@lazka lazka force-pushed the fix-cc-command-line branch from 2e6d057 to 629f8ff Compare December 18, 2021 12:59
@jaraco jaraco merged commit e63d022 into pypa:main Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants