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

pypi tarball no longer includes documentation.py #167

Closed
jelly opened this issue Feb 22, 2025 · 8 comments · Fixed by #169
Closed

pypi tarball no longer includes documentation.py #167

jelly opened this issue Feb 22, 2025 · 8 comments · Fixed by #169

Comments

@jelly
Copy link

jelly commented Feb 22, 2025

The released tarball contains tests/test.py but lacks tests/documentation.py which makes it impossible to run the unit tests during an Arch Linux package build.

@micheles
Copy link
Owner

I decided to remove the tests from the tarball, I am not sure why test.py Is still there. I will have a look.

@micheles
Copy link
Owner

micheles commented Feb 22, 2025

In the wheel test.py is missing, as I expected, but it is present in the tarball, seems to be an idiosyncrasy of the new build process (python -m build) which is ignoring the MANIFEST or something (building a Python package keeps getting more complicated).

@jelly
Copy link
Author

jelly commented Feb 22, 2025

Ok, I would still like to run the unit tests during the building of the Arch Linux package to confirm that newer Python versions work correctly. So as alternative I am happy to switch to using git sources but I noticed there is no tag for 5.2.0

@micheles
Copy link
Owner

Ah, I forgot to push the tag! It is there now: https://github.com/micheles/decorator/releases/tag/5.2.0

@mgorny
Copy link
Contributor

mgorny commented Feb 23, 2025

I decided to remove the tests from the tarball, I am not sure why test.py Is still there.

That really sucks for us. Running the the test suite is crucial for packagers, as well as having a reliable source package available. And given that this is a pure Python package, all pip users use wheels anyway, so we're practically the only users of source packages.

@micheles
Copy link
Owner

micheles commented Feb 23, 2025

I am willing to make changes to help you packagers. My thinking was that everybody use wheels and people wanting the sources can get them from github: https://github.com/micheles/decorator/archive/refs/tags/5.2.0.tar.gz.
Actually, in the future I would like to generate the PyPI package directly from an action in GitHub. If you have suggestions to offer or recipes to fix the current generation of the source package, please let me know.

@jelly
Copy link
Author

jelly commented Feb 23, 2025

For Arch I have switched to using Git as the source so if there are tags then it's all good.

@mgorny
Copy link
Contributor

mgorny commented Feb 23, 2025

people wanting the sources can get them from github: https://github.com/micheles/decorator/archive/refs/tags/5.2.0.tar.gz.

Git archives are unfortunately unreliable. Besides, we'd rather see source distributions in top shape, since once release signing lands in PyPI, they'll be even more important.

Actually, in the future I would like to generate the PyPI package directly from an action in GitHub. If you have suggestions to offer or recipes to fix the current generation of the source package, please let me know.

I'll take a shot at fixing the build. As for GitHub Actions, I think literally the equivalent of:

python -m build
twine upload dist/*

would work here. However, I'm not experienced with that. GitHub workflows have been compromised too many times for me to trust them for making releases.

mgorny added a commit to mgorny/decorator that referenced this issue Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants