File: 0002-workaround-for-new-path-sip-dir-in-pyqt5-5.15.0-dfsg.patch

package info (click to toggle)
ros-python-qt-binding 0.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 168 kB
  • sloc: python: 346; xml: 31; makefile: 25
file content (24 lines) | stat: -rw-r--r-- 961 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Mon, 28 Sep 2020 18:26:33 +0200
Subject: workaround for new path sip dir in pyqt5 >= 5.15.0+dfsg-1+exp1

---
 cmake/sip_configure.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmake/sip_configure.py b/cmake/sip_configure.py
index 22c01cc..44221af 100644
--- a/cmake/sip_configure.py
+++ b/cmake/sip_configure.py
@@ -65,6 +65,11 @@ def get_sip_dir_flags(config):
         if os.path.exists(default_sip_dir):
             return default_sip_dir, sip_flags
 
+        # workaround for new path sip dir in pyqt5 >= 5.15.0+dfsg-1+exp1
+        default_sip_dir = '/usr/lib/python3/dist-packages/PyQt5/bindings'
+        if os.path.exists(default_sip_dir):
+            return default_sip_dir, sip_flags
+
         # Homebrew installs sip files here by default
         default_sip_dir = os.path.join(sipconfig._pkg_config['default_sip_dir'], 'Qt5')
         if os.path.exists(default_sip_dir):