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

session.install fails on MSYS2 virtualenv #630

Closed
davidhewitt opened this issue Jul 12, 2022 · 1 comment · Fixed by #901
Closed

session.install fails on MSYS2 virtualenv #630

davidhewitt opened this issue Jul 12, 2022 · 1 comment · Fixed by #901
Labels

Comments

@davidhewitt
Copy link
Contributor

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

@davidhewitt
Copy link
Contributor Author

I think it's because nox is expecting the virtualenv bin dir to be Scripts (to match the rest of the windows ecosystem) but msys2 virtualenv creates it as bin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant