File: multiple-boost-python.patch

package info (click to toggle)
pygattlib 0~20210616-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 468 kB
  • sloc: ansic: 5,031; cpp: 1,684; python: 386; makefile: 46; sh: 1
file content (27 lines) | stat: -rw-r--r-- 991 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
25
26
27
Description: fix libboost detection with multiple python versions
 pygattlib always links against the first libboost_python.so it finds.
 When building for multiple python versions, this is wrong; it should link
 against the one matching the version of python we're building for.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Bug-Debian: https://bugs.debian.org/999806
Last-Update: 2022-01-02

Index: pygattlib-0~20201113/setup.py
===================================================================
--- pygattlib-0~20201113.orig/setup.py
+++ pygattlib-0~20201113/setup.py
@@ -11,12 +11,8 @@
 
 
 def get_boost_version(out=None):
-    if out is None:
-        out = subprocess.check_output(
-            r"ldconfig -p | grep -E 'libboost_python.*\.so '", shell=True)
-
-    ver = os.path.splitext(out.split()[0][3:])[0].decode()
-    return ver
+    return 'boost_python%s%s' \
+            % (sys.version_info.major, sys.version_info.minor)
 
 def tests():
     # case: python3-py3x.so