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

Detect session.install('pip'....) with --no-install #693

Open
q0w opened this issue Feb 14, 2023 · 2 comments
Open

Detect session.install('pip'....) with --no-install #693

q0w opened this issue Feb 14, 2023 · 2 comments

Comments

@q0w
Copy link
Contributor

q0w commented Feb 14, 2023

How would this feature be useful?

I want to use --no-venv and --no-install so I need to rewrite all session.install with session.run('pip'...) but nox does not detect that and runs the installation process.

Describe the solution you'd like

Detect session.install args and check if --no-install arg is provided

Describe alternatives you've considered

No response

Anything else?

No response

@theacodes
Copy link
Collaborator

You want Nox to error on session.run('pip'...) when --no-install is specified? That's kind of the explicit escape hatch for that, so I'm hesitant to overreach there.

@cjolowicz
Copy link
Collaborator

You can use session.run_always which will be skipped under --no-install.

Despite the (somewhat misleading) name, it's the API to run installation-phase commands that don't implicitly use pip install.

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

No branches or pull requests

3 participants