diff options
| author | exislow <exislow@users.noreply.github.com> | 2025-01-05 18:43:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-05 18:43:26 +0100 |
| commit | aa763a9bca9f70071582d18e575c4357afbb4b77 (patch) | |
| tree | 9e42cfeac9593265daae8262b623a0c2a24e01a9 /tidal_dl_ng/__init__.py | |
| parent | 9318d1bf7436236d616d0e8e6d243800da932477 (diff) | |
| parent | edcd689840af69bd611a6735e3586cef59b5449a (diff) | |
| download | tidal-dl-ng-aa763a9bca9f70071582d18e575c4357afbb4b77.tar.gz | |
Merge pull request #311 from exislow/nuitka
Shifting from PyInstaller to Nuitka
Diffstat (limited to 'tidal_dl_ng/__init__.py')
| -rw-r--r-- | tidal_dl_ng/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tidal_dl_ng/__init__.py b/tidal_dl_ng/__init__.py index 5fb660b..9037212 100644 --- a/tidal_dl_ng/__init__.py +++ b/tidal_dl_ng/__init__.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import importlib.metadata -import sys from pathlib import Path from urllib.parse import urlparse @@ -98,8 +97,9 @@ def is_dev_env() -> bool: result: bool = False # Check if package is running from source code == dev mode - # If package is not running in PyInstaller environment. - if not getattr(sys, "frozen", False) and not hasattr(sys, "_MEIPASS"): + # If package is not running in Nuitka environment, try to import it from pip libraries. + # If this also fails, it is dev mode. + if "__compiled__" not in globals(): try: importlib.metadata.version(package_name) except: |
