Skip to content

Ensure tox works correctly with pymanager #3639

@clint-lawrence

Description

@clint-lawrence

What's the problem this feature will solve?

pymanager can by used to manager python installations on windows. However calling py.exe from a tox command doesn't work because pymanager uses the LOCALAPPDATA environment variable to track it's installed runtimes. By default tox doesn't pass this

Describe the solution you'd like

tox should pass the LOCALAPPDATA environment variable to created subprocesses, so that if they use pymanager to run python scripts, pymanager can correctly find the installed runtimes.

Alternative Solutions

The pass_env configuration flag could also be used, but you need to know that it is needed. And this error is obscure to track down.

Additional context

I realise this is a little at odds with the intention of tox, where tox usually manages virtual env creation to test against different python version. However the particular underlying use case here is tool which is part of the overall workflow, which only works with a specific python version. It should always be run with that specific version of python (i.e. it is not the code under test).

I've also asked over on the pymanager project to confirm if this makes sense from their end.
python/pymanager#211

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions