-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Please include tests in pypi distfile #2864
Comments
Thanks for the report - I honestly have not been aware that we are not even distributing the tests itself in our sdists. Nevertheless, I am not sure what would be the best approach here either for the PDF files itself - these currently originate from the repository itself (11.3 MB), the sample-files repository (14.5 MB) and downloaded from the internet (290 MB). |
Hm, perhaps include the |
PyPI does not allow distributing (pure) data files. In my opinion, bundling the resources and tests directory inside the sdist should be doable. For the sample-files repository, I am not sure, but there are not much changes and I consider it easy enough to download the archive from the git commit from GitHub. The remaining 290 MB will most likely never be distributed by us, as they can be downloaded with a single command or skipped entirely - depending on how your build machines are handling network requests. |
The reason why I excluded tests is to make pypdf small so that downloads in CI are fast. I don't want to include tests in wheels. For source distribution, I don't have a strong opinion. |
It is rather uncommon to bundle tests in the binary wheels, but for the sdists its rather usual. The request is about the "source tar.gz files", thus the sdists which should match your opinion. |
@0-wiz-0 If you maintain your request, can you please propose a PR that will add tests to .tar.gz but keep .whl unchanged |
We explicitly ignore the test directory at the moment: Line 65 in dcd15aa
make_release.py is never distributed and thus the corresponding tests are always skipped). To bundle the resources directory, we would have to remove it from the same list, but adapt MANIFEST.in as well to include these files.
|
Maybe I'm wrong but if we juste remove it, wouldn't the tests folder be added to the whl ? |
Line 65 is in the 'sdist' section, so I'd assume it only affects the source distribution. |
I can not see any sectIon about wheel. |
Update: On me!🤭🤭 |
No, you would have to mark the tests as a module as well to bundle them inside the binary wheel. |
Explanation
I'm packaging pypdf for pkgsrc. We have standardized on using the pypi source tar.gz files.
When updating packages, I like to run the test suite to make sure the software works fine.
The tests are currently not included, please include them in the pypi source file to allow this.
Thank you!
The text was updated successfully, but these errors were encountered: