-
Notifications
You must be signed in to change notification settings - Fork 932
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
Add discussion of package formats, expanding "Wheel vs Egg" discussion #1397
Conversation
CI had a spurious failure:
Can it be retried? |
924ebef
to
cffb4b0
Compare
I have updated this PR with latest main and made some minor fixes. Review would be appreciated. |
cffb4b0
to
5af20bf
Compare
Fixed the merge conflict. Review would still be appreciated 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Some comments/nitpicks, but they should not block getting this merged
Thank you! |
I want to dispute a point made in this discussion:
This differs from the explanation offered for wheels specifically:
(Emphasis mine.) There is nothing in the description there (nor in the original PEP), as far as I can tell, which forbids If |
This is a discussion intended to be a helpful explanation for confused users, not a standard. Virtually nobody includes |
(Sorry if you saw the double-post - I had some kind of glitch with the GitHub submission form.) I'm pretty sure that wheels are intended to be allowed to include
(same as in the other PyPA documentation)
If installers like Pip are meant to reject or filter such files then that really ought to be made explicit somewhere. But I would be surprised. Wheel is a "binary" distribution and open-source is not supposed to be a requirement to distribution Python code, to the best of my knowledge. (In my testing, Pip will happily unpack the |
Version specific wheels are definitely permitted to contain pyc files. They're usually omitted to make the archive smaller (since they can be losslessly recreated on the target system), but only universal wheels necessarily omit them. So I think what @jeanas has written here is correct for the most typical case (public distribution on PyPI), but could reasonably be updated (in a new PR) with a footnote (or something along those lines) pointing out the wheel archives are permitted to include compiled Python files, they just usually don't (for the reasons stated). |
This a discussion that I would have found useful not long ago. I seem not to be alone.
After merging this, a redirect should be added in RTD from https://packaging.python.org/en/latest/discussions/wheel-vs-egg/ to https://packaging.python.org/en/latest/discussions/package-formats/ .
📚 Documentation preview 📚: https://python-packaging-user-guide--1397.org.readthedocs.build/en/1397/