After examining the tarballs from PyPi for packages that use poetry none of them had their tests distributed.
Because of this occurrence I was wondering if that behavior was being enforced somehow here.
Where are your tests in your source tree ?
If they are in a specific directory, I've solved a similar issue by adding to my pyproject.toml:
packages = [
{ include = "myproject"},
{ include = "migrations"},
{ include = "etc"},
{ include = "tests"},
{ include = "scripts"},
]
Where are your tests in your source tree ?
This is actually a problem for me packaging poetry and its dependents.
And their tests tend to be at tests/.
If they are in a specific directory, I've solved a similar issue by adding to my pyproject.toml:
That appears to possibly be a solution? Maybe @sdispater could add that to all their pyproject.toml?
@worldofpeace Poetry does not package the tests directory in the release tarballs so you have to package them explicitly like @sfermigier said.
@sdispater certain distributions of Linux, specifically Debian is the main one I am aware of, require that they build debian package using the source tarball, and having tests in that source tarball allows them to run tests to verify the package was installed successfully.
The complaint here isn't for projects using poetry but that poetry itself does not ship a source tarball with tests and thus it is harder to package.
Yes this is useful for downstream distributions to test if the package works correctly with their build recipe. Also, it provides a great way to test if the dependencies packaged by the distribution are compatible.
I recently reviewed and merged this package for NixOS and we have that same policy as Debian.
Packages for Gentoo Linux also support a dedicated testing phase for the exact reasons @worldofpeace mentioned above.
Since there are many distros that would greatly appreciate having these tests would you accept my prs to add what sfermigier has suggested @sdispater?
A related problem is #1067 in which I'm trying to include the tests only into the source distribution, not into the wheel.
tests) for different formats. Poetry will not do so automatically聽since the tests don't necessarily reside in a tests directory. It's the responsibility of the project maintainers to specify that the sdist should contain the tests package聽Thanks for adding this feature @sdispater
Thanks, though the issue here was that I was requesting if poetry and related packages (it's dependents) authored by you @sdispater could include the tests like that in the sdist.
Most helpful comment
Packages for Gentoo Linux also support a dedicated testing phase for the exact reasons @worldofpeace mentioned above.