Backport upstream commit 6efb22b to permit building with Cython 0.23.x
authorAfif Elghraoui <afif@ghraoui.name>
Tue, 6 Oct 2015 07:41:18 +0000 (00:41 -0700)
committerAfif Elghraoui <afif@ghraoui.name>
Tue, 6 Oct 2015 07:41:18 +0000 (00:41 -0700)
Closes: 800794
debian/patches/cython23.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/cython23.patch b/debian/patches/cython23.patch
new file mode 100644 (file)
index 0000000..27afe0f
--- /dev/null
@@ -0,0 +1,39 @@
+From 6efb22b1a3ee4bc57a691f163b456b417da56db3 Mon Sep 17 00:00:00 2001
+From: Andreas Heger <andreas.heger@gmail.com>
+Date: Thu, 3 Sep 2015 21:25:28 +0100
+Subject: [PATCH] change ctypedef enum to typedef enum for cython 0.23
+Bug: https://github.com/pysam-developers/pysam/issues/164
+---
+ pysam/chtslib.pxd | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pysam/chtslib.pxd b/pysam/chtslib.pxd
+index 2f8c941..299e84a 100644
+--- a/pysam/chtslib.pxd
++++ b/pysam/chtslib.pxd
+@@ -363,7 +363,7 @@ cdef extern from "htslib/hts.h" nogil:
+         hFILE   *hfile
+         void    *voidp
+-    ctypedef enum htsFormatCategory:
++    cdef enum htsFormatCategory:
+         unknown_category
+         sequence_data    # Sequence data -- SAM, BAM, CRAM, etc
+         variant_data     # Variant calling data -- VCF, BCF, etc
+@@ -371,14 +371,14 @@ cdef extern from "htslib/hts.h" nogil:
+         region_list      # Coordinate intervals or regions -- BED, etc
+         category_maximum
+-    ctypedef enum htsExactFormat:
++    cdef enum htsExactFormat:
+         unknown_format
+         binary_format
+         text_format
+         sam, bam, bai, cram, crai, vcf, bcf, csi, gzi, tbi, bed
+         format_maximum
+-    ctypedef enum htsCompression:
++    cdef enum htsCompression:
+         no_compression, gzip, bgzf, custom
+         compression_maximum
index 55ab44674bf956d0dbf49e43ab55a223c491bc55..01d5a2dbfda6e1a07b7ba655609ac3783aafb007 100644 (file)
@@ -5,3 +5,4 @@ ignore-htslib-dir.patch
 improve-python3-compatibility.patch
 sam_mpileup.patch
 strip_online_tests.patch
+cython23.patch