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

Include conftest.py into the source distribution #95

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

lorepirri
Copy link
Contributor

@lorepirri lorepirri commented Oct 3, 2023

Context

In #87 a tests/conftest.py was added to the tests folder. Some tests use the fixture to_bytes_or_str_buf specified in tests/conftest.py, and therefore, the file is needed.

Problem

The last two source distribution tarballs do not include the tests/conftest.py file.

  1. json-stream-rs-tokenizer-0.4.22.tar.gz
  2. json-stream-rs-tokenizer-0.4.23.tar.gz

Possible cause

When creating the source distribution, the command pipx run build --sdist will only consider test/test*.py (and probably also tests/test*.py) as far as it concerns the test scripts.

Suggestion:

  • include explicitly the tests/conftest.py using the MANIFEST.in configuration file.

@smheidrich
Copy link
Owner

Thanks a lot!

Since you figured out the tests/*.py thing down to the exact line in setuptools' code, maybe you could also open a PR with packaging.python.org to fix that in their docs? :D

@smheidrich smheidrich merged commit b0f9754 into smheidrich:main Oct 4, 2023
@lorepirri lorepirri deleted the include-conftest-into-sdist branch October 4, 2023 15:19
@lorepirri
Copy link
Contributor Author

Thanks a lot!

Since you figured out the tests/*.py thing down to the exact line in setuptools' code, maybe you could also open a PR with packaging.python.org to fix that in their docs? :D

Thank you for your time!

I can see from pypa/distutils#187 and pypa/packaging.python.org#1165 that it's been in discussion for a long time already. If I have time I will open a PR for that.

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 this pull request may close these issues.

2 participants