Merge pull request #115460 from austinbutler/pre-commit-2-11-0

pre-commit: 2.7.1 -> 2.11.0
This commit is contained in:
Sandro 2021-03-10 21:52:00 +01:00 committed by GitHub
commit 52962f598c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View file

@ -2,7 +2,6 @@
, aspy-yaml
, cached-property
, cfgv
, futures
, identify
, importlib-metadata
, importlib-resources
@ -16,13 +15,13 @@
buildPythonPackage rec {
pname = "pre-commit";
version = "2.7.1";
version = "2.11.0";
disabled = isPy27;
src = fetchPypi {
inherit version;
pname = "pre_commit";
sha256 = "0w2a104yhbw1z92rcwpq0gdjsxvr2bwx5ry5xhlf2psnfkjx6ky5";
sha256 = "15f1chxrbmfcajk1ngk3jvf6jjbigb5dg66wnn7phmlywaawpy06";
};
patches = [

View file

@ -12,15 +12,15 @@ index 26f4919..4885ec1 100644
if version != C.DEFAULT:
cmd.extend(['-n', version])
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py
index e17376e..0c1d2ab 100644
index 43b7280..f0f2338 100644
--- a/pre_commit/languages/python.py
+++ b/pre_commit/languages/python.py
@@ -204,7 +204,7 @@ def install_environment(
@@ -192,7 +192,7 @@ def install_environment(
additional_dependencies: Sequence[str],
) -> None:
envdir = prefix.path(helpers.environment_dir(ENVIRONMENT_DIR, version))
- venv_cmd = [sys.executable, '-mvirtualenv', envdir]
+ venv_cmd = ['@virtualenv@/bin/virtualenv', envdir]
python = norm_version(version)
- venv_cmd = (sys.executable, '-mvirtualenv', envdir, '-p', python)
+ venv_cmd = ('@virtualenv@/bin/virtualenv', envdir, '-p', python)
install_cmd = ('python', '-mpip', 'install', '.', *additional_dependencies)
with clean_path_on_failure(envdir):
if python is not None:
venv_cmd.extend(('-p', python))