Closed mtelka closed 1 year ago
I was curious if this was a regression introduced in #1324 and have confirmed that it is not. We have never included the tox.ini
file in the sdist package. So the question is, do we want to start? Is this typical?
As an aside, it is easy to run tests of our code with python -m unittest discover tests
. No dependencies are needed for that and therefore tox is not needed. However, if you want to run the various other tox envs, then tox would certainly be beneficial. However, I have never seen the need to do that outside of a dev environment. But when would one be using the sdist in such an environment? Wouldn't a working copy of the git repo make more sense there?
I'm packaging markdown (and many other Python projects) for OpenIndiana. During the packaging we prefer to run tests to make sure everything is okay. We found several bugs either in our platform or in various Python projects using this approach. To make the integration as smooth as possible we prefer standardized way to run tests. Currently the most usual way to run tests is via tox
, although we support many other ways to run tests (like direct pytest
testing, etc.). Since your project provides tox.ini
then it would be great to have it in sdist too.
An idea to use copy of git repo is possible too, but that's harder to do automatically (we do have all the packaging fully automatic, including testing) because there is no direct and reliable link from PyPI to github repo or github tarball.
And yes, the tox.ini
included in sdist is common. Also, some build backends include tox.ini
to sdist automatically. IIRC, either flit_core and/or hatchling does so.
For reference here is an example how similar issue got handled in virtualenv recently.
Thank you.
A PR is welcome.
:+1: Fedora packaging also prefers to work from sdists rather than git checkouts, when possible. rpmbuild
has a %check
stage, which would similarly depend on the tox.ini
being included before it could be used.
Since it's a one-line change, see #1340.
The sdist package at PyPI is missing
tox.ini
file. Please add the missing file to sdist to make downstream testing easier. Thank you.