-
Notifications
You must be signed in to change notification settings - Fork 657
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
pip whl missing py.typed
#698
Comments
Hi @jhonatan-lopes, and thanks for raising this issue. I'm not much of a packaging/distribution expert, so I have a couple of questions to help clarify my understanding:
|
Hi @jsvine! I'm not a distributions expert in any way either :) but I'm trying my best to get typing annotations working for this amazing library, especially given the trouble with putting up the annotations in the code in first place. Packaging should have been the easy part. To your questions:
I honestly don't know why However, if I might humbly offer a suggestion, in our projects we have been migrating away from a |
I found a similar problem on It seems that they had the same issue as it's happening here. The only difference in code now seems to be that their package_data={"httpx": ["py.typed"]}, which is not present on Nonetheless, I'm not sure which build system they are using and whether that would be enough to build it properly. I thought that having the |
Sorry, new update. From zip_safe=False must be added to The httpx package figured this out with this PR. @jsvine, I could raise a PR with these changes if you would like to. Please let me know. |
Thank you for those explanations and that detective work, @jhonatan-lopes! And thank you for offering to submit a PR. That sounds great, and I'd appreciate it. Cheers. |
Fixed via your PR in #703 — many thanks! |
The bug
#657 introduced a
py.typed
marker to indicate to mypy that the package is typed. However, the built distribution on pypi (wheel file) is missing thepy.typed
file, whereas the source distribution is including it, as it should.When building the package locally with
pip wheel .
(with my fork ofpdfplumber
), the package builds successfully andpy.typed
is included in the build and the wheel file.Expected behavior
The
py.typed
file maker should be included in the pypi wheel distribution.Actual behavior
The
py.typed
file maker is missing from the built distribution on pypi.Screenshots
First, the
.tar.gz
source distribution showing thepy.typed
file:Now, the
.whl
built distribution missing thepy.typed
file:The locally built
.whl
distribution:Environment
The text was updated successfully, but these errors were encountered: