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

Zipped PEXes don't contain directory entries. #1021

Closed
jsirois opened this issue Aug 29, 2020 · 0 comments · Fixed by #1022
Closed

Zipped PEXes don't contain directory entries. #1021

jsirois opened this issue Aug 29, 2020 · 0 comments · Fixed by #1022
Assignees
Labels

Comments

@jsirois
Copy link
Member

jsirois commented Aug 29, 2020

PEP-420 implicit namespace packages require directories with no __init__.py children to implicitly declare a namespace package. As such, the zipfile created by the Pex CLI / PEXBuilder is invalid since it only contains file entries and not directory entries. This, for example, has caused Pants (see: pantsbuild/pants#10608) to need to always mark all PEXes --not-zip-safe even when they otherwise are to force the PEX code portion to be exploded to disk, which implicitly creates parent directories on the filesystem if needed, satisfying PEP-420.

@jsirois jsirois added the bug label Aug 29, 2020
@jsirois jsirois self-assigned this Aug 29, 2020
jsirois added a commit to jsirois/pex that referenced this issue Aug 29, 2020
Previously they did not which led to PEP-420 namespace packages not
working in `--zip-safe` context.

Fixes pex-tool#1021
This was referenced Aug 29, 2020
jsirois added a commit to jsirois/pex that referenced this issue Aug 29, 2020
Previously they did not which led to PEP-420 namespace packages not
working in `--zip-safe` context.

Fixes pex-tool#1021
jsirois added a commit to jsirois/pex that referenced this issue Aug 29, 2020
Previously they did not which led to PEP-420 namespace packages not
working in `--zip-safe` context.

Fixes pex-tool#1021
jsirois added a commit that referenced this issue Aug 29, 2020
Previously they did not which led to PEP-420 namespace packages not
working in `--zip-safe` context.

Fixes #1021
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