mgedmin / check-python-versions

Check that supported Python versions in a setup.py match tox.ini, .travis.yml and a bunch of other files
https://pypi.org/project/check-python-versions/
GNU General Public License v3.0
21 stars 12 forks source link

support for tox into setup.cfg #35

Open gpongelli opened 1 year ago

gpongelli commented 1 year ago

Tox can be configured also into setup.cfg file, e.g.

[tox:tox]
isolated_build = true
envlist = lint, format, py3.8, py3.9, py3.10, py3.11, build

or, using default naming convention

[tox:tox]
isolated_build = true
envlist = lint, format, py38, py39, py310, py311, build
mgedmin commented 1 year ago

Wait. tox allows dots in environment names? tox -e py3.11? Whoa. That should probably be a separate issue.

jugmac00 commented 1 year ago

This is a surprise for me, too. I will check with the other maintainers whether this was introduced intentionally with tox v4 or not.

jugmac00 commented 1 year ago

Ok, looks like this is a feature, and not even a new one, see https://tox.wiki/en/latest/user_guide.html#test-environments

gpongelli commented 1 year ago

Wait. tox allows dots in environment names? tox -e py3.11? Whoa. That should probably be a separate issue.

I don't know. I use this dotted notation because, having poetry that run tox environments locally and remotely, I've encountered errors when using normal notation (py39 , py310...) . This is because I need to use poetry environments (where packages from poetry.lock are installed, also tox) instead of directly running tox environments (if so, there is a duplication of package lists to be installed: first list into pyproject.toml for poetry env and then same list into setup.cfg/tox.ini for tox); I obviously prefer having only one source of truth instead of maintaining same things in different places. If you want elaborate on, this is the cookiecutter template I've created and constantly use to create new packages using both poetry and tox.

Reading the link from @jugmac00 , seems it's "supported" : You can also specify these factors with a period between the major and minor versions (e.g. pyN.M) , but I use them just for poetry environment switching.

gpongelli commented 1 year ago

I've done changes on local branch for this issue, but it depends on PR #39 so I wait to push it until dependent PR will be merged 😉