👷 PyInstaller binary detection replaced with Nuitka's version.

This commit is contained in:
Robert Honz
2025-01-05 18:36:35 +01:00
parent ca6e2b3ef7
commit 39449ac581
+3 -3
View File
@@ -1,6 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
import importlib.metadata import importlib.metadata
import sys
from pathlib import Path from pathlib import Path
from urllib.parse import urlparse from urllib.parse import urlparse
@@ -98,8 +97,9 @@ def is_dev_env() -> bool:
result: bool = False result: bool = False
# Check if package is running from source code == dev mode # Check if package is running from source code == dev mode
# If package is not running in PyInstaller environment. # If package is not running in Nuitka environment, try to import it from pip libraries.
if not getattr(sys, "frozen", False) and not hasattr(sys, "_MEIPASS"): # If this also fails, it is dev mode.
if "__compiled__" not in globals():
try: try:
importlib.metadata.version(package_name) importlib.metadata.version(package_name)
except: except: