File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import unicode_literals
22
33import os .path
4+ import sys
45
56from pre_commit .languages import python
67from pre_commit .util import CalledProcessError
1011ENVIRONMENT_DIR = 'py_venv'
1112
1213
14+ def get_default_version (): # pragma: no cover (version specific)
15+ if sys .version_info < (3 ,):
16+ return 'python3'
17+ else :
18+ return python .get_default_version ()
19+
20+
1321def orig_py_exe (exe ): # pragma: no cover (platform specific)
1422 """A -mvenv virtualenv made from a -mvirtualenv virtualenv installs
1523 packages to the incorrect location. Attempt to find the _original_ exe
@@ -43,6 +51,5 @@ def make_venv(envdir, python):
4351 cmd_output (orig_py_exe (python ), '-mvenv' , envdir , cwd = '/' )
4452
4553
46- get_default_version = python .get_default_version
4754_interface = python .py_interface (ENVIRONMENT_DIR , make_venv )
4855in_env , healthy , run_hook , install_environment = _interface
You can’t perform that action at this time.
0 commit comments