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

Rewrite common executables to use the Python selected by tox #69

Open
jaraco opened this issue Jun 25, 2023 · 1 comment
Open

Rewrite common executables to use the Python selected by tox #69

jaraco opened this issue Jun 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jaraco
Copy link

jaraco commented Jun 25, 2023

In jaraco/skeleton#86, @mtelka proposes to replace pytest in the tox commands with python -m pytest in order to avoid ambiguity in which Python version is used to execute the tests.

As described in that issue, making that change has other effects and would exist only to support a narrow set of uses.

Since tox-current-env is implicated in the failure and since it already re-writes the handling of python as an executable, perhaps this project should also handle other common executables (pytest to start, but maybe others) by replacing such invocations with python -m pytest or perhaps {sys.executable} $(which pytest).

This approach would address the issue more selectively and surgically where it's needed and avoid the need to adapt many (all?) downstream packages to use a non-standard approach to accommodate users of this project.

@hroncok
Copy link
Member

hroncok commented Jun 26, 2023

Thanks for the report. This will be tricky.

Replacing pytest with python -m pytest has side effects.

Anyway, this limitation is documented: https://github.com/fedora-python/tox-current-env#do-not-rely-on-virtualenv-details

@hroncok hroncok added the enhancement New feature or request label Jun 26, 2023
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

2 participants