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

Allow user to inject specific Pythons to try as step 1 during discovery #1526

Merged
merged 1 commit into from
Feb 16, 2020

Conversation

gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Feb 16, 2020

At the moment it's unnecessarily hard to specify a specific python
executable to use for a given spec. While mangling with the path
might work for environments for tox environments that require a python
differing the host tox python version; for environments matching the
host tox interpreter it's impossible to use any other interpreter than
what tox uses. Here we add a CLI argument (fallback to some environment
variable for CI usage) that allows the user to inject custom python
interpreters as step 1 of the discovery mechanism.

PS. Initially ran into this while trying to address pypa/virtualenv#1641, having multiple pythonx.y (framework vs non-framework) versions installed in parallel found no way to force gracefully tox to use a given one.

Copy link
Contributor

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg2m

At the moment it's unecessarily hard to specify a specific python
executable to use for a given spec. While mangling with the path
might work for environments for tox environments that require a python
differing the host tox python version; for environments matching the
host tox interpreter it's impossible to use any other interpreter than
what tox uses. Here we add a CLI argument (fallback to some environment
variable for CI usage) that allows the user to inject custom python
interpreters as step 1 of the discovery mechanism.

Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
@gaborbernat gaborbernat merged commit 7409527 into tox-dev:master Feb 16, 2020
@gaborbernat gaborbernat deleted the force branch February 16, 2020 23:36
bmwiedemann added a commit to bmwiedemann/openSUSE that referenced this pull request Mar 26, 2020
https://build.opensuse.org/request/show/786809
by user scarabeus_iv + dimstar_suse
- Disable spinner tests as the monkeypatch changed behaviour in pytest

- version update to 3.14.5
  - Add ``--discover`` (fallback to ``TOX_DISCOVER`` environment variable via path separator) to inject python executables
    to try as first step of a discovery - note the executable still needs to match the environment by :user:`gaborbernat`.
    `#1526 <https://github.com/tox-dev/tox/issues/1526>`_
  - Bump minimal six version needed to avoid using one incompatible with newer
    virtualenv. - by :user:`ssbarnea`
    `#1519 <https://github.com/tox-dev/tox/issues/1519>`_
  - Avoid pypy test failure due to undefined printout var. - by :user:`ssbarnea`
    `#1521 <https://github.com/tox-dev/tox/issues/1521>`_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants