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

support for tox into setup.cfg #35

Open
gpongelli opened this issue Jan 26, 2023 · 5 comments
Open

support for tox into setup.cfg #35

gpongelli opened this issue Jan 26, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@gpongelli
Copy link
Contributor

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
Copy link
Owner

mgedmin commented Jan 27, 2023

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

@mgedmin mgedmin added the enhancement New feature or request label Jan 27, 2023
@jugmac00
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants