@@ -25,7 +25,7 @@ def get_virtualenv_name(self, requirements_file: Path) -> str:
25
25
26
26
Either:
27
27
28
- * SHA1 of the requirements file and Arca version
28
+ * hash of the requirements file and Arca version
29
29
* ``no_requirements_file`` if the requirements file doesn't exist.
30
30
31
31
:param requirements_file: :class:`Path <pathlib.Path>` to where the requirements file
@@ -37,7 +37,7 @@ def get_virtualenv_name(self, requirements_file: Path) -> str:
37
37
else :
38
38
return self .get_requirements_hash (requirements_file )
39
39
40
- def create_or_get_venv (self , path : Path ) -> Path :
40
+ def get_or_create_venv (self , path : Path ) -> Path :
41
41
"""
42
42
Gets the name of the virtualenv from :meth:`get_virtualenv_name`, checks if it exists already,
43
43
creates it and installs requirements otherwise. The virtualenvs are stored in a folder based
@@ -46,9 +46,9 @@ def create_or_get_venv(self, path: Path) -> Path:
46
46
:param path: :class:`Path <pathlib.Path>` to the cloned repository.
47
47
"""
48
48
requirements_file = self .get_requirements_file (path )
49
- requirements_name = self .get_virtualenv_name (requirements_file )
49
+ venv_name = self .get_virtualenv_name (requirements_file )
50
50
51
- venv_path = Path (self ._arca .base_dir ) / "venvs" / requirements_name
51
+ venv_path = Path (self ._arca .base_dir ) / "venvs" / venv_name
52
52
53
53
if not venv_path .exists ():
54
54
logger .info (f"Creating a venv in { venv_path } " )
@@ -91,4 +91,4 @@ def create_or_get_venv(self, path: Path) -> Path:
91
91
def get_or_create_environment (self , repo : str , branch : str , git_repo : Repo , repo_path : Path ) -> str :
92
92
""" Handles the requirements in the target repository, returns a path to a executable of the virtualenv.
93
93
"""
94
- return str (self .create_or_get_venv (repo_path ).resolve () / "bin" / "python" )
94
+ return str (self .get_or_create_venv (repo_path ).resolve () / "bin" / "python" )
0 commit comments