From f4d1e8c484cbf505d6b25e39bb2076220517f9bb Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Wed, 27 Mar 2024 15:33:35 +0800 Subject: [PATCH] refactor: address review feedback --- src/puya/compile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/puya/compile.py b/src/puya/compile.py index f9d2b5c3d9..d550bf593f 100644 --- a/src/puya/compile.py +++ b/src/puya/compile.py @@ -178,12 +178,12 @@ def _get_python_executable() -> str | None: logger.info(f"Found python prefix: {prefix}") venv_paths = sysconfig.get_paths(vars={"base": prefix}) + python_exe = None for python in ("python3", "python"): python_exe = shutil.which(python, path=venv_paths["scripts"]) if python_exe: + logger.debug(f"Using python executable: {python_exe}") break - if python_exe: - logger.debug(f"Using python executable: {python_exe}") else: logger.warning("Found a python prefix, but could not find the expected python interpreter") # use glob here, as we don't want to assume the python version @@ -201,7 +201,7 @@ def _get_python_executable() -> str | None: logger.debug(f"Using python site-packages: {site_packages}") _check_algopy_version(site_packages) - return str(python_exe) + return python_exe def _get_prefix() -> str | None: