Remove hts_utell, no longer in libhts3
authorMichael R. Crusoe <michael.crusoe@gmail.com>
Fri, 3 Jan 2020 20:09:25 +0000 (21:09 +0100)
committerMichael R. Crusoe <michael.crusoe@gmail.com>
Fri, 3 Jan 2020 20:27:27 +0000 (21:27 +0100)
debian/changelog
debian/patches/hts1.10 [new file with mode: 0644]
debian/patches/series

index 151d7a87faa3df2498cb688a9264f725735fd336..9f451b40a0e45932b7ae48d7e7bd067149b83872 100644 (file)
@@ -1,4 +1,4 @@
-python-pysam (0.15.3+ds-1) UNRELEASED; urgency=medium
+python-pysam (0.15.3+ds-1) unstable; urgency=medium
 
   * Team upload.
   * New upstream release. Not yet dropping py2 due to paleomix and pbsuite
@@ -7,8 +7,10 @@ python-pysam (0.15.3+ds-1) UNRELEASED; urgency=medium
   * Trim trailing whitespace.
   * Use secure URI in Homepage field.
   * Set upstream metadata fields: Repository.
+  * New patch to remove symbols that were dropped in htslib 1.10:
+    hts_utell, hts_useek (Closes: #947426)
 
- -- Michael R. Crusoe <michael.crusoe@gmail.com>  Tue, 06 Aug 2019 19:37:44 +0200
+ -- Michael R. Crusoe <michael.crusoe@gmail.com>  Fri, 03 Jan 2020 21:25:33 +0100
 
 python-pysam (0.15.2+ds-2) unstable; urgency=medium
 
diff --git a/debian/patches/hts1.10 b/debian/patches/hts1.10
new file mode 100644 (file)
index 0000000..1f563ef
--- /dev/null
@@ -0,0 +1,47 @@
+Author: Michael R. Crusoe <michael.crusoe@gmail.com>
+Description: Remove symbol that was removed in libhts3
+--- python-pysam.orig/pysam/htslib_util.h
++++ python-pysam/pysam/htslib_util.h
+@@ -5,9 +5,6 @@
+ #include "htslib/vcf.h"
+ #include "htslib/khash.h"
+-int hts_useek(htsFile *fp, long uoffset, int where);
+-long hts_utell(htsFile *fp);
+-
+ int hts_set_verbosity(int verbosity);
+ int hts_get_verbosity(void);
+--- python-pysam.orig/pysam/libchtslib.pxd
++++ python-pysam/pysam/libchtslib.pxd
+@@ -632,8 +632,6 @@
+     int8_t HTS_FMT_CRAI
+     BGZF *hts_get_bgzfp(htsFile *fp)
+-    int hts_useek(htsFile *fp, long uoffset, int where)
+-    long hts_utell(htsFile *fp)
+     ctypedef struct hts_idx_t
+--- python-pysam.orig/pysam/libchtslib.pyx
++++ python-pysam/pysam/libchtslib.pyx
+@@ -489,9 +489,6 @@
+         if self.htsfile.format.compression == bgzf:
+             with nogil:
+                 ret = bgzf_seek(hts_get_bgzfp(self.htsfile), offset, SEEK_SET)
+-        elif self.htsfile.format.compression == no_compression:
+-            with nogil:
+-                ret = hts_useek(self.htsfile, <int>offset, SEEK_SET)
+         else:
+             raise NotImplementedError("seek not implemented in files compressed by method {}".format(
+                 self.htsfile.format.compression))
+@@ -508,9 +505,6 @@
+         if self.htsfile.format.compression == bgzf:
+             with nogil:
+                 ret = bgzf_tell(hts_get_bgzfp(self.htsfile))
+-        elif self.htsfile.format.compression == no_compression:
+-            with nogil:
+-                ret = hts_utell(self.htsfile)
+         elif self.htsfile.format.format == cram:
+             with nogil:
+                 ret = htell(cram_fd_get_fp(self.htsfile.fp.cram))
index 6f406d9dd9cb8facfe8025f4497b4b67aa8057ef..ee3984a7869ebd6a952ceefc98cbcb5376fb7ef1 100644 (file)
@@ -1,2 +1,3 @@
 skip_test_remote.patch
 spelling
+hts1.10