mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Allow pip to be upgradable on windows
This commit is contained in:
parent
171fd18ba5
commit
522e82b7b7
1 changed files with 2 additions and 4 deletions
|
|
@ -182,8 +182,8 @@ def py_interface(
|
||||||
version: str,
|
version: str,
|
||||||
additional_dependencies: Sequence[str],
|
additional_dependencies: Sequence[str],
|
||||||
) -> None:
|
) -> None:
|
||||||
additional_dependencies = tuple(additional_dependencies)
|
|
||||||
directory = helpers.environment_dir(_dir, version)
|
directory = helpers.environment_dir(_dir, version)
|
||||||
|
install = ('python', '-mpip', 'install', '.', *additional_dependencies)
|
||||||
|
|
||||||
env_dir = prefix.path(directory)
|
env_dir = prefix.path(directory)
|
||||||
with clean_path_on_failure(env_dir):
|
with clean_path_on_failure(env_dir):
|
||||||
|
|
@ -193,9 +193,7 @@ def py_interface(
|
||||||
python = os.path.realpath(sys.executable)
|
python = os.path.realpath(sys.executable)
|
||||||
_make_venv(env_dir, python)
|
_make_venv(env_dir, python)
|
||||||
with in_env(prefix, version):
|
with in_env(prefix, version):
|
||||||
helpers.run_setup_cmd(
|
helpers.run_setup_cmd(prefix, install)
|
||||||
prefix, ('pip', 'install', '.') + additional_dependencies,
|
|
||||||
)
|
|
||||||
|
|
||||||
return in_env, healthy, run_hook, install_environment
|
return in_env, healthy, run_hook, install_environment
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue