summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-04-08 19:53:38 +0200
committerDavid Seifert <soap@gentoo.org>2023-04-08 19:53:38 +0200
commite88f627a3bada9db443b5234ac3fa71c6102c63d (patch)
treead409ce779160c98cd748a77d1ec799a03e1ba89 /sci-biology
parentnet-print/hplip-plugin: Stabilize 3.22.10 amd64, #899282 (diff)
downloadgentoo-e88f627a3bada9db443b5234ac3fa71c6102c63d.tar.gz
gentoo-e88f627a3bada9db443b5234ac3fa71c6102c63d.tar.bz2
gentoo-e88f627a3bada9db443b5234ac3fa71c6102c63d.zip
sci-biology/pysam: fix build with cython 3
Closes: https://bugs.gentoo.org/898730 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/pysam/files/pysam-0.21.0-cython-3.patch24
-rw-r--r--sci-biology/pysam/pysam-0.21.0.ebuild6
2 files changed, 30 insertions, 0 deletions
diff --git a/sci-biology/pysam/files/pysam-0.21.0-cython-3.patch b/sci-biology/pysam/files/pysam-0.21.0-cython-3.patch
new file mode 100644
index 000000000000..303a4fb0dcdc
--- /dev/null
+++ b/sci-biology/pysam/files/pysam-0.21.0-cython-3.patch
@@ -0,0 +1,24 @@
+From 17bb13dcfdb56ac238458dcef23fe01893a892e9 Mon Sep 17 00:00:00 2001
+From: John Marshall <jmarshall@hey.com>
+Date: Sat, 8 Apr 2023 11:00:46 +1200
+Subject: [PATCH] Remove incorrect type annotation
+
+The annotation already in pysam/libcbcf.pyi is correct.
+Fixes #1179 as reopened on April 6th.
+---
+ pysam/libcbcf.pyx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pysam/libcbcf.pyx b/pysam/libcbcf.pyx
+index 8c088af2..8ecfe5f3 100644
+--- a/pysam/libcbcf.pyx
++++ b/pysam/libcbcf.pyx
+@@ -3479,7 +3479,7 @@ cdef class VariantRecordSample(object):
+ return bcf_format_get_alleles(self)
+
+ @alleles.setter
+- def alleles(self, value: tuple):
++ def alleles(self, value):
+ # Sets the genotype, supply a tuple of alleles to set.
+ # The supplied alleles need to be defined in the correspoding pysam.libcbcf.VariantRecord
+ # The genotype is reset when an empty tuple, None or (None,) is supplied
diff --git a/sci-biology/pysam/pysam-0.21.0.ebuild b/sci-biology/pysam/pysam-0.21.0.ebuild
index 588cd1bc4f1b..77292ed29613 100644
--- a/sci-biology/pysam/pysam-0.21.0.ebuild
+++ b/sci-biology/pysam/pysam-0.21.0.ebuild
@@ -31,6 +31,12 @@ distutils_enable_tests pytest
DISTUTILS_IN_SOURCE_BUILD=1
+PATCHES=(
+ # backport
+ # https://github.com/pysam-developers/pysam/commit/17bb13dcfdb56ac238458dcef23fe01893a892e9
+ "${FILESDIR}"/${P}-cython-3.patch
+)
+
EPYTEST_DESELECT=(
# only work with bundled htslib
'tests/tabix_test.py::TestRemoteFileHTTP'