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

Tests not included in sdist #20

Open
jayvdb opened this issue Sep 2, 2022 · 1 comment
Open

Tests not included in sdist #20

jayvdb opened this issue Sep 2, 2022 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Sep 2, 2022

The sdist (tarball) at PyPI doesnt contain the test files. i.e. https://files.pythonhosted.org/packages/26/60/4e49c18caf0ba7b7222da47ea6143f4f1ea3993f043be7bdf4ae409e544d/pytest-datafiles-2.0.1.tar.gz

Not including the tests makes it harder to package this for distros.

I notice that #10 is currently in flight, so it may be better to do that first, as poetry has its own way of recording which .py and data files need to be included in the sdist.

for reference, poetry needs something like the following in pyproject.toml:

packages = [
    { include = "pytest_datafiles.py"},  # not sure about this line
    { include = "tests", format = "sdist" },  # this is the voodoo, but maybe something extra is needed to ensure the _fixture_files is also included
]
@omarkohl
Copy link
Owner

I am no longer doing much development with Python so I am not up to date with the latest best practices. I need some justification why poetry is the way to go, ideally some list of advantages and disadvantages with sources.

Including the tests in the sdist seems reasonable, even though I know very little about packaging for distros. I am open to PRs including the tests in sdist.

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

No branches or pull requests

2 participants