Sims/pyinstaller misuse fix (#657)

* Fix misuse of pyinstaller

* Fix breaking change

* Fix pywright import errors
This commit is contained in:
Sims
2024-08-05 00:00:49 +02:00
committed by GitHub
parent dcfaf11696
commit 75aa1e4851
3 changed files with 18 additions and 15 deletions
+5 -1
View File
@@ -93,7 +93,11 @@ def get_system_pythonpaths() -> list[str]:
proc = subprocess.run(["python3" if localplatform.ON_LINUX else "python", "-c", "import sys; print('\\n'.join(x for x in sys.path if x))"],
# TODO make this less insane
capture_output=True, user=localplatform.localplatform._get_user_id() if localplatform.ON_LINUX else None, env={} if localplatform.ON_LINUX else None) # pyright: ignore [reportPrivateUsage]
return [x.strip() for x in proc.stdout.decode().strip().split("\n")]
proc.check_returncode()
versions = [x.strip() for x in proc.stdout.decode().strip().split("\n")]
return [x for x in versions if x and not x.isspace()]
except Exception as e:
logger.warn(f"Failed to execute get_system_pythonpaths(): {str(e)}")
return []