[med-svn] [Git][med-team/python-freecontact][master] Link against correct libboost as per python interpreter version (Closes: #1092510)
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Tue Jan 14 12:47:31 GMT 2025
Nilesh Patra pushed to branch master at Debian Med / python-freecontact
Commits:
4e1e1c35 by Nilesh Patra at 2025-01-14T12:47:29+00:00
Link against correct libboost as per python interpreter version (Closes: #1092510)
- - - - -
3 changed files:
- + debian/patches/fix_boost_linkage.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/patches/fix_boost_linkage.patch
=====================================
@@ -0,0 +1,25 @@
+Description: boost python libs are versioned. Simply using liboost_python does not work.
+ Added in a small function to return proper boost version as per interpreter
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2025-01-14
+--- a/setup.py
++++ b/setup.py
+@@ -17,6 +17,11 @@
+ #
+ from distutils.core import setup, Extension
+ from glob import glob
++import sys
++
++def get_boost_version():
++ return 'boost_python%s%s' \
++ % (sys.version_info.major, sys.version_info.minor)
+
+ setup( name = 'python-freecontact',
+ version = '1.1',
+@@ -30,7 +35,7 @@
+ ext_modules = [Extension(
+ name = 'freecontact',
+ sources = glob('src/*.cpp'),
+- libraries = ['freecontact', 'boost_python'])]
++ libraries = ['freecontact', get_boost_version()])]
+ )
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
fix_test_failed.patch
+fix_boost_linkage.patch
\ No newline at end of file
=====================================
debian/rules
=====================================
@@ -2,17 +2,8 @@
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
-
export PYBUILD_NAME = freecontact
-export PY3SO = $(shell py3versions --default --version | sed 's/\.//')
-
-# Workaround linker error, failing to locate -lboost_python.
-export LIBRARY_PATH = $(CURDIR)
-execute_before_dh_auto_build:
- ln -sv /usr/lib/$(DEB_HOST_MULTIARCH)/libboost_python$(PY3SO).so \
- $(CURDIR)/libboost_python.so
-
%:
dh $@ --with python3 --buildsystem=pybuild --builddirectory=$(CURDIR)/builddir
View it on GitLab: https://salsa.debian.org/med-team/python-freecontact/-/commit/4e1e1c3593ad6b028febd442855c2c8225513856
--
View it on GitLab: https://salsa.debian.org/med-team/python-freecontact/-/commit/4e1e1c3593ad6b028febd442855c2c8225513856
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250114/bc3d523c/attachment-0001.htm>
More information about the debian-med-commit
mailing list