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

feat: add options for disabling venv in python #3173

Closed
wants to merge 2 commits into from

Conversation

twmht
Copy link

@twmht twmht commented Mar 28, 2024

In many cases, the dependencies we need are not available on PyPI but are bundled within an image, such as the Arm64 version of Nvidia/TensorRT, which does not offer a wheel file. When using virtualenv, it becomes impossible to locate this package. This PR introduces an option allowing users to use the current Python Environment directly. This is particularly beneficial in CI/CD scenarios.

@asottile
Copy link
Member

absolutely not. this bypasses a core promise of pre-commit that it will never touch your system packages

@asottile asottile closed this Mar 28, 2024
@twmht
Copy link
Author

twmht commented Mar 29, 2024

@asottile

how about "cloning" the current virtual env (or system) to the newly venv, this ensures that it does not affect the system level packages and also resolove the dependency problems (if the dependencty can be found on system packages but not Pypi).

A similar solution would be like this

https://allwin-raju-12.medium.com/cloning-or-copying-a-virtual-environment-7d1efffccac6

@asottile
Copy link
Member

no, pre-commit only installs from it's config file otherwise caching is intractable

@pre-commit pre-commit locked as off-topic and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants