3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pre-commit/languages-use-the-hardcoded-path-to-python-binaries.patch

27 lines
1.1 KiB
Diff
Raw Normal View History

2020-05-20 21:24:52 +01:00
diff --git a/pre_commit/languages/node.py b/pre_commit/languages/node.py
index 26f4919..4885ec1 100644
--- a/pre_commit/languages/node.py
+++ b/pre_commit/languages/node.py
@@ -82,7 +82,7 @@ def install_environment(
envdir = fr'\\?\{os.path.normpath(envdir)}'
with clean_path_on_failure(envdir):
cmd = [
- sys.executable, '-mnodeenv', '--prebuilt', '--clean-src', envdir,
+ '@nodeenv@/bin/nodeenv', '--prebuilt', '--clean-src', envdir,
]
if version != C.DEFAULT:
cmd.extend(['-n', version])
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py
2021-03-09 00:56:06 +00:00
index 43b7280..f0f2338 100644
2020-05-20 21:24:52 +01:00
--- a/pre_commit/languages/python.py
+++ b/pre_commit/languages/python.py
2021-03-09 00:56:06 +00:00
@@ -192,7 +192,7 @@ def install_environment(
additional_dependencies: Sequence[str],
2020-05-20 21:24:52 +01:00
) -> None:
envdir = prefix.path(helpers.environment_dir(ENVIRONMENT_DIR, version))
2021-03-09 00:56:06 +00:00
- venv_cmd = [sys.executable, '-mvirtualenv', envdir]
+ venv_cmd = ['@virtualenv@/bin/virtualenv', envdir]
2020-05-20 21:24:52 +01:00
python = norm_version(version)
2021-03-09 00:56:06 +00:00
if python is not None:
venv_cmd.extend(('-p', python))