nox
nox copied to clipboard
`session.install` fails on MSYS2 virtualenv
Current Behavior
Install nox
using MSYS2 Python. (Use setup-msys2 action to create an environment on Github actions.)
session.install(<anything>)
will fail, with errors such as the following:
nox > Error: python is not installed into the virtualenv, it is located at D:/a/_temp/msys64/mingw64/bin/python.EXE. Pass external=True into run() to explicitly allow this.
I tried to use --no-error-on-external-run
flag to workaround this, but it looks like the implementation of session.install
hard forces external="error"
so this makes it a hard blocker.
Expected Behavior
nox
is able to install required dependencies into the virtualenv.
Steps To Reproduce
See https://github.com/davidhewitt/msys2-nox-repro for a minimal repro to set up an environment in Github actions which reproduces this failure.
Failing run is e.g. https://github.com/davidhewitt/msys2-nox-repro/runs/7296705086?check_suite_focus=true
Environment
- OS: Windows 10
- Python: 3.10 (MinGW / MSYS2)
- Nox: 2022.1.7
Anything else?
No response