You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
👍 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.
Activity
waylan commentedon Apr 21, 2023
I was curious if this was a regression introduced in #1324 and have confirmed that it is not. We have never included the
tox.inifile 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?mtelka commentedon Apr 21, 2023
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 directpytesttesting, etc.). Since your project providestox.inithen 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.iniincluded in sdist is common. Also, some build backends includetox.inito 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.
waylan commentedon Apr 24, 2023
A PR is welcome.
ferdnyc commentedon May 3, 2023
👍 Fedora packaging also prefers to work from sdists rather than git checkouts, when possible.
rpmbuildhas a%checkstage, which would similarly depend on thetox.inibeing included before it could be used.Since it's a one-line change, see #1340.
Include tox.ini in sdist