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

Avoid ENOEXEC for Pex internal --venvs. #1842

Closed
jsirois opened this issue Jul 12, 2022 · 0 comments · Fixed by #1843
Closed

Avoid ENOEXEC for Pex internal --venvs. #1842

jsirois opened this issue Jul 12, 2022 · 0 comments · Fixed by #1843
Assignees
Labels

Comments

@jsirois
Copy link
Member

jsirois commented Jul 12, 2022

Although #1828 fixed running PEX zip files that might re-direct to PEX_ROOT housed --venvs with pex scripts that had too-long shebangs, it did not fix this same issue for the internal loose PEXes dogfooded by PEX itself. This dogfood PEXes are used at PEX buildtime.

In short, #1828 fixed runtime, but it did not fix buildtime.

There are two dogfood loose venv PEXes Pex executes by running the venv pex script and both should be switched to running via <venv_dir>/bin/python <venv_dir>/pex`:

  1. The PEP-517 / PEP-518 sdist building code:
    https://github.com/pantsbuild/pex/blob/ddc2d23799b976d301626d1ca8ee27947674d738/pex/build_system/pep_518.py#L57-L88
    https://github.com/pantsbuild/pex/blob/ddc2d23799b976d301626d1ca8ee27947674d738/pex/build_system/pep_517.py#L85-L118
  2. The Pip tool:
    https://github.com/pantsbuild/pex/blob/3e71bc7896935a8177e9bbe9399769c3522528dc/pex/pip/tool.py#L235-L280
    https://github.com/pantsbuild/pex/blob/3e71bc7896935a8177e9bbe9399769c3522528dc/pex/pip/tool.py#L407-L408
@jsirois jsirois added the bug label Jul 12, 2022
This was referenced Jul 12, 2022
@jsirois jsirois self-assigned this Jul 12, 2022
jsirois added a commit that referenced this issue Jul 12, 2022
The fix in #1828 did not cover the two dogfood venvs Pex uses to run
its own internal tools. Add a failing test for each of these cases and
fix with a new `VenvPex` type that ~forces doing the right thing.

Fixes #1842
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant