File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -63,16 +63,7 @@ def _getInterpreter(path: str | PathLike[str]) -> pathlib.Path:
6363 return pathlib .Path ("/lib64/ld-linux-x86-64.so.2" )
6464 case arch :
6565 raise RuntimeError (f"Error: Unsupported architecture for { path } : only support x86_64 (003e), aarch64 (00b7) and i686 (0003), but was { arch } " )
66-
67- def _get_python_from_path () -> pathlib .Path | None :
68- interpreter = None
69- for dir in os .environ ["PATH" ].split (":" ):
70- binary = pathlib .Path (dir , "python3" )
71- if binary .is_file ():
72- interpreter = binary
73- break
74- return interpreter
75-
66+
7667def _get_default_package_dir () -> pathlib .Path | None :
7768 """
7869 Finds the default site-packages or dist-packages directory of the default python3 environment
@@ -82,7 +73,7 @@ def _get_default_package_dir() -> pathlib.Path | None:
8273 """
8374
8475 # Needs to escape the virtual environment python-gardenlinx-lib is running in
85- interpreter = _get_python_from_path ( )
76+ interpreter = shutil . which ( "python3" )
8677 if interpreter :
8778 out = subprocess .run (
8879 [interpreter , "-c" , "import site; print(site.getsitepackages()[0])" ],
You can’t perform that action at this time.
0 commit comments