Package: pygattlib Version: 0~20201113-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jammy ubuntu-patch
Hi Nobuhiro, Python3.10 has been introduced in Ubuntu, and as part of the rebuild of packages against 3.10 I noticed that pygattlib misbuilds, linking both the python3.9 and python3.10 extensions against the same version of libboost_python instead of linking each against the matching version. The attach patch fixes the build so that each binary extension will always be built against the matching libboost_python. Regards, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru pygattlib-0~20201113/debian/patches/multiple-boost-python.patch pygattlib-0~20201113/debian/patches/multiple-boost-python.patch --- pygattlib-0~20201113/debian/patches/multiple-boost-python.patch 1969-12-31 16:00:00.000000000 -0800 +++ pygattlib-0~20201113/debian/patches/multiple-boost-python.patch 2021-11-16 13:32:24.000000000 -0800 @@ -0,0 +1,26 @@ +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.langa...@ubuntu.com> +Last-Update: 2021-11-16 + +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 diff -Nru pygattlib-0~20201113/debian/patches/series pygattlib-0~20201113/debian/patches/series --- pygattlib-0~20201113/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 +++ pygattlib-0~20201113/debian/patches/series 2021-11-16 13:25:54.000000000 -0800 @@ -0,0 +1 @@ +multiple-boost-python.patch