Add patch to fix proper so ext
authorNilesh Patra <nilesh@debian.org>
Fri, 30 Dec 2022 14:34:01 +0000 (14:34 +0000)
committerNilesh Patra <nilesh@debian.org>
Fri, 30 Dec 2022 14:34:01 +0000 (14:34 +0000)
debian/patches/python3.11.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/python3.11.patch b/debian/patches/python3.11.patch
new file mode 100644 (file)
index 0000000..507b31c
--- /dev/null
@@ -0,0 +1,14 @@
+Description: Add patch to return proper sysconf so for current python
+Author: Nilesh Patra <nilesh@debian.org>
+Last-Update: 2022-12-30
+--- a/pysam/__init__.py
++++ b/pysam/__init__.py
+@@ -96,5 +96,7 @@
+     if pysam.config.HTSLIB == "builtin":
+         pysam_libs.append('libchtslib')
+-    so = sysconfig.get_config_var('SO')
++    so = sysconfig.get_config_var('EXT_SUFFIX')
++    if not so: 
++        so = sysconfig.get_config_var('SO')
+     return [os.path.join(dirname, x + so) for x in pysam_libs]
index 3e2bcd08650b314d3af6a40a35fa48dadf334b88..973b469c243c6c66a3b4ce44c5fe9f4b7835a7b2 100644 (file)
@@ -2,3 +2,4 @@ skip_test_remote.patch
 clean_less
 skip-test-on-32-bit.patch
 disable-tests-python3.11.patch
+python3.11.patch