aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside-tools/deploy_lib/dependency_util.py
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-07-31 15:41:31 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-08-01 11:00:10 +0200
commit046984a59b5c9a9566446a8f83ad4d07009bad52 (patch)
treeb87edb76850d4aa4d3d276429fdc1fd11c3d2381 /sources/pyside-tools/deploy_lib/dependency_util.py
parent31ceb060f204dd5df0725bad48eb7a9e27d2416a (diff)
Desktop Deployment: Consider 'dist-packages'
- For certain debian systems, the system Python uses 'dist-packages' directory for installing Python packages instead of 'site-packages'. This patchs adds a check for 'dist-packages' directory. Pick-to: 6.7 Fixes: PYSIDE-2785 Change-Id: I697e2939ff4114cad0e696d8920322d080be9386 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools/deploy_lib/dependency_util.py')
-rw-r--r--sources/pyside-tools/deploy_lib/dependency_util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/pyside-tools/deploy_lib/dependency_util.py b/sources/pyside-tools/deploy_lib/dependency_util.py
index 6cab75cfc..35973445c 100644
--- a/sources/pyside-tools/deploy_lib/dependency_util.py
+++ b/sources/pyside-tools/deploy_lib/dependency_util.py
@@ -218,12 +218,15 @@ class QtDependencyReader:
"""
Finds the path to the Qt libs directory inside PySide6 package installation
"""
+ # PYSIDE-2785 consider dist-packages for Debian based systems
for possible_site_package in site.getsitepackages():
- if possible_site_package.endswith("site-packages"):
+ if possible_site_package.endswith(("site-packages", "dist-packages")):
self.pyside_install_dir = Path(possible_site_package) / "PySide6"
+ if self.pyside_install_dir.exists():
+ break
if not self.pyside_install_dir:
- print("Unable to find site-packages. Exiting ...")
+ print("Unable to find where PySide6 is installed. Exiting ...")
sys.exit(-1)
if sys.platform == "win32":