Skip to content

Fix bdist_pex --pex-args #285

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

Merged
merged 2 commits into from
Jul 18, 2016
Merged

Fix bdist_pex --pex-args #285

merged 2 commits into from
Jul 18, 2016

Conversation

brbsix
Copy link
Contributor

@brbsix brbsix commented Jul 13, 2016

Splitting on spaces will break on commands like:

python setup.py bdist_pex \
    --pex-args="--python-shebang='#!/usr/bin/env python'"

This uses shlex.split() to do it safely.

Splitting on spaces with break on commands like:
    python setup.py bdist_pex \
        --pex-args="--python-shebang='#!/usr/bin/env python'"

This uses shlex.split instead.
@kwlzn
Copy link
Contributor

kwlzn commented Jul 16, 2016

lgtm - how would you feel about a quick test or modification to the existing test that repros the pre-fix breakage for the shebang+space case?

@brbsix
Copy link
Contributor Author

brbsix commented Jul 17, 2016

Just added tests for bdist_pex --pex-args shebangs both with and without spaces. #!/usr/bin/env python and #!/usr/bin/python, respectively.

@kwlzn kwlzn merged commit 5d387aa into pex-tool:master Jul 18, 2016
@kwlzn
Copy link
Contributor

kwlzn commented Jul 18, 2016

thanks @brbsix - this is in master.

@kwlzn kwlzn mentioned this pull request Jul 18, 2016
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