-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
How to use w/o virtualenv
#1114
Comments
you can override though note that if you don't have Line 35 in 07f6641
|
For example: - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: trailing-whitespace
language: python_venv |
@asottile wow lightning fast response, thanks so much this is perfect and exactly what I was looking for. Not worried about the dependency, we package all our tools with https://github.com/linkedin/shiv so it's available to Thanks again, this is great. |
ah makes sense 👍 -- I've seen some other hacks with |
come to think of it, if I build pre-commit with shiv's |
dope! that's what I was remembering! 🎉 |
For more context, I used the above to workaround broken virtualenv layouts. |
@rpatterson probably you fixed it in some other way, it was probably some other change like installing |
Howdy! Thanks for the excellent work on this tool!
I have a peculiar environment and I'd like to get pre-commit working for it. We have many individual repositories, and in order to keep them self-contained we have some automation that installs a "clean" (untainted) python and prevents anything from being installed into it's site-packages.
As such, pre-commit fails to execute due to a lack of
virtualenv
in our "clean" python:Of course,
venv
is available, as it's part of the standard library as of 3.3, but unfortunately virtualenv is not. If I install it manually into my local site-packagespython3 -m pip install virtualenv --user
it works fine:if I change
pre_commit/languages/python.py:172
to:cmd = (sys.executable, '-mvenv', envdir)
then things also work as expected.Is there a way to configure or modify the default behavior to avoid
-mvirtualenv
completely? Or at least fall back on or prefer-mvenv
?Thanks in advance! And thanks again for all the great work 🙏
The text was updated successfully, but these errors were encountered: