[med-svn] [Git][med-team/pairtools][master] 9 commits: Strip out non-relevant parts from numpy patch
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Sat Dec 31 17:48:35 GMT 2022
Nilesh Patra pushed to branch master at Debian Med / pairtools
Commits:
13c1c221 by Nilesh Patra at 2022-12-31T22:59:52+05:30
Strip out non-relevant parts from numpy patch
- - - - -
57decf6a by Nilesh Patra at 2022-12-31T22:59:52+05:30
Add patch to fix build
- - - - -
e88c12bc by Nilesh Patra at 2022-12-31T22:59:52+05:30
Skip building docs, as manpages are not rendered the same way anymore
- - - - -
61db385f by Nilesh Patra at 2022-12-31T22:59:52+05:30
Get rid of B-D on sphinx-click
- - - - -
3f1cd5f0 by Nilesh Patra at 2022-12-31T23:01:51+05:30
Fix autopkgtests well
- - - - -
7778cf36 by Nilesh Patra at 2022-12-31T23:01:51+05:30
Upload to unstable
- - - - -
2c94a068 by Nilesh Patra at 2022-12-31T23:10:07+05:30
Move doc/examples/* installation to dedicated examples package
- - - - -
ad850819 by Nilesh Patra at 2022-12-31T23:16:49+05:30
Add pytest to B-D
- - - - -
0dffa681 by Nilesh Patra at 2022-12-31T17:48:17+00:00
I will upload this in a few hours
- - - - -
11 changed files:
- debian/changelog
- debian/control
- + debian/patches/fix-pysam-ftbfs.patch
- debian/patches/numpy-1.24.patch
- debian/patches/series
- debian/python3-pairtools-examples.install
- − debian/python3-pairtools.examples
- − debian/python3-pairtools.manpages
- debian/rules
- debian/tests/control
- debian/tests/upstream-tests
Changes:
=====================================
debian/changelog
=====================================
@@ -1,21 +1,24 @@
pairtools (1.0.2-1) UNRELEASED; urgency=medium
+ [ Nilesh Patra ]
+ * Team Upload.
* Add patch to fix FTBFS with numpy 1.24 (Closes: #1027232)
* Bump Standards-Version to 4.6.2 (no changes needed)
* New upstream version 1.0.2
-
- -- Nilesh Patra <nilesh at debian.org> Fri, 30 Dec 2022 22:38:50 +0530
-
-pairtools (1.0.1-1) unstable; urgency=medium
-
- * Team upload.
- * New upstream version
- * Standards-Version: 4.6.1 (routine-update)
+ * Add patch for missing bam_dup1 declaration (Closes: #1027335)
+ * Versioned Build dep against pysam
+ * Build depend on python3-bioframe
+ * Skip building docs, as manpages are not rendered the same
+ way anymore
+ * Get rid of B-D on sphinx-click
+ * Move doc/examples/* installation to dedicated examples package
+
+ [ Andreas Tille]
* Fix clean target
* Build-Depends: python3-pandas, python3-pysam, python3-scipy, libhts-dev,
python3-yaml <!nocheck>
- -- Andreas Tille <tille at debian.org> Fri, 16 Sep 2022 15:32:38 +0200
+ -- Nilesh Patra <nilesh at debian.org> Sat, 31 Dec 2022 17:47:56 +0000
pairtools (0.3.0-3.2) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -13,8 +13,8 @@ Build-Depends: debhelper-compat (= 13),
python3-numpy,
python3-pandas,
python3-pysam (>= 0.20.0+ds-3~),
+ python3-pytest,
python3-scipy,
- python3-sphinx-click,
libhts-dev,
python3-yaml <!nocheck>
Standards-Version: 4.6.2
=====================================
debian/patches/fix-pysam-ftbfs.patch
=====================================
@@ -0,0 +1,75 @@
+Description: The bam_dup1 funtion desc is missing from pysam, hence manually add in a couple
+ of functions
+Author: Nilesh Patra <nilesh at debian.org>
+Forwarded: not-needed
+Last-Update: 2022-12-31
+--- /dev/null
++++ b/pairtools/lib/bam_header.h
+@@ -0,0 +1,37 @@
++#ifndef BAM_HEADER_H
++#define BAM_HEADER_H
++
++#include "htslib/sam.h"
++#include "htslib/vcf.h"
++#include "htslib/khash.h"
++
++bam1_t *bam_init1()
++{
++ return (bam1_t*)calloc(1, sizeof(bam1_t));
++}
++
++bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
++{
++ uint8_t *data = bdst->data;
++ int m_data = bdst->m_data; // backup data and m_data
++ if (m_data < bsrc->l_data) { // double the capacity
++ m_data = bsrc->l_data; kroundup32(m_data);
++ data = (uint8_t*)realloc(data, m_data);
++ }
++ memcpy(data, bsrc->data, bsrc->l_data); // copy var-len data
++ *bdst = *bsrc; // copy the rest
++ // restore the backup
++ bdst->m_data = m_data;
++ bdst->data = data;
++ return bdst;
++}
++
++bam1_t *bam_dup1(const bam1_t *bsrc)
++{
++ if (bsrc == NULL) return NULL;
++ bam1_t *bdst = bam_init1();
++ if (bdst == NULL) return NULL;
++ return bam_copy1(bdst, bsrc);
++}
++
++#endif
+--- /dev/null
++++ b/pairtools/lib/parse_pysam.pxd
+@@ -0,0 +1,27 @@
++from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
++from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
++
++cdef extern from "bam_header.h" nogil:
++ ctypedef struct bam1_core_t:
++ int32_t tid
++ int32_t pos
++ uint16_t bin
++ uint8_t qual
++ uint8_t l_qname
++ uint16_t flag
++ uint8_t unused1
++ uint8_t l_extranul
++ uint32_t n_cigar
++ int32_t l_qseq
++ int32_t mtid
++ int32_t mpos
++ int32_t isize
++
++ ctypedef struct bam1_t:
++ bam1_core_t core
++ int l_data
++ uint32_t m_data
++ uint8_t *data
++ uint64_t id
++
++ bam1_t *bam_dup1(const bam1_t *bsrc)
=====================================
debian/patches/numpy-1.24.patch
=====================================
@@ -12,190 +12,3 @@ Last-Update: 2022-12-30
]
# establish structure of an empty _stat:
---- /dev/null
-+++ b/pairtools/lib/htslib_util.h
-@@ -0,0 +1,145 @@
-+#ifndef HTSLIB_UTIL_H
-+#define HTSLIB_UTIL_H
-+
-+#include "htslib/sam.h"
-+#include "htslib/vcf.h"
-+#include "htslib/khash.h"
-+
-+/*
-+typedef struct {
-+ int32_t tid;
-+ int32_t pos;
-+ uint32_t bin:16, qual:8, l_qname:8;
-+ uint32_t flag:16, n_cigar:16;
-+ int32_t l_qseq;
-+ int32_t mtid;
-+ int32_t mpos;
-+ int32_t isize;
-+} bam1_core_t;
-+
-+typedef struct {
-+ bam1_core_t core;
-+ int l_aux, data_len, m_data;
-+ uint8_t *data;
-+} bam1_t;
-+*/
-+
-+bam1_t *bam_init1()
-+{
-+ return (bam1_t*)calloc(1, sizeof(bam1_t));
-+}
-+
-+bam1_t *bam_copy1(bam1_t *bdst, const bam1_t *bsrc)
-+{
-+ uint8_t *data = bdst->data;
-+ int m_data = bdst->m_data; // backup data and m_data
-+ if (m_data < bsrc->l_data) { // double the capacity
-+ m_data = bsrc->l_data; kroundup32(m_data);
-+ data = (uint8_t*)realloc(data, m_data);
-+ }
-+ memcpy(data, bsrc->data, bsrc->l_data); // copy var-len data
-+ *bdst = *bsrc; // copy the rest
-+ // restore the backup
-+ bdst->m_data = m_data;
-+ bdst->data = data;
-+ return bdst;
-+}
-+
-+bam1_t *bam_dup1(const bam1_t *bsrc)
-+{
-+ if (bsrc == NULL) return NULL;
-+ bam1_t *bdst = bam_init1();
-+ if (bdst == NULL) return NULL;
-+ return bam_copy1(bdst, bsrc);
-+}
-+
-+int hts_set_verbosity(int verbosity);
-+int hts_get_verbosity(void);
-+
-+
-+KHASH_MAP_INIT_STR(vdict, bcf_idinfo_t)
-+typedef khash_t(vdict) vdict_t;
-+
-+KHASH_DECLARE(s2i, kh_cstr_t, int64_t)
-+typedef khash_t(s2i) s2i_t;
-+
-+//////////////////////////////////////////////////////////////////
-+//////////////////////////////////////////////////////////////////
-+//////////////////////////////////////////////////////////////////
-+// various helper functions
-+//
-+
-+/*!
-+ @abstract Update the variable length data within a bam1_t entry
-+
-+ Old data is deleted and the data within b are re-arranged to
-+ make place for new data.
-+
-+ @discussion Return NULL on error, otherwise b is returned.
-+
-+ @param b bam1_t data
-+ @param nbytes_old size of old data
-+ @param nbytes_new size of new data
-+ @param pos position of data
-+*/
-+bam1_t * pysam_bam_update(bam1_t * b,
-+ const size_t nbytes_old,
-+ const size_t nbytes_new,
-+ uint8_t * pos);
-+
-+// translate a nucleotide character to binary code
-+unsigned char pysam_translate_sequence(const unsigned char s);
-+
-+// return byte size of type
-+int aux_type2size(uint8_t type);
-+
-+
-+//-------------------------------------------------------
-+// Wrapping accessor macros in sam.h
-+static inline int pysam_bam_is_rev(bam1_t * b) {
-+ return bam_is_rev(b);};
-+
-+static inline int pysam_bam_is_mrev(bam1_t * b) {
-+ return bam_is_mrev(b);}
-+
-+static inline char * pysam_bam_get_qname(bam1_t * b) {
-+ return bam_get_qname(b);}
-+
-+static inline uint32_t * pysam_bam_get_cigar(bam1_t * b) {
-+ return bam_get_cigar(b);}
-+
-+static inline uint8_t * pysam_bam_get_seq(bam1_t * b) {
-+ return bam_get_seq(b);}
-+
-+static inline uint8_t * pysam_bam_get_qual(bam1_t * b) {
-+ return bam_get_qual(b);}
-+
-+static inline uint8_t * pysam_bam_get_aux(bam1_t * b) {
-+ return bam_get_aux(b);}
-+
-+static inline int pysam_bam_get_l_aux(bam1_t * b) {
-+ return bam_get_l_aux(b); }
-+
-+static inline char pysam_bam_seqi(uint8_t * s, int i) {
-+ return bam_seqi(s,i);}
-+
-+static inline uint8_t pysam_get_qual(bam1_t * b) {
-+ return b->core.qual;}
-+
-+static inline uint32_t pysam_get_n_cigar(bam1_t * b) {
-+ return b->core.n_cigar;}
-+
-+static inline void pysam_set_qual(bam1_t * b, uint8_t v) {
-+ b->core.qual=v;}
-+
-+static inline void pysam_set_n_cigar(bam1_t * b, uint32_t v) {
-+ b->core.n_cigar=v;}
-+
-+static inline void pysam_update_flag(bam1_t * b, uint16_t v, uint16_t flag) {
-+ if (v)
-+ b->core.flag |= flag;
-+ else
-+ b->core.flag &= ~flag;
-+}
-+
-+#endif
---- /dev/null
-+++ b/pairtools/lib/parse_pysam.pxd
-@@ -0,0 +1,27 @@
-+from libc.stdint cimport int8_t, int16_t, int32_t, int64_t
-+from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t
-+
-+cdef extern from "htslib/sam.h" nogil:
-+ ctypedef struct bam1_core_t:
-+ int32_t tid
-+ int32_t pos
-+ uint16_t bin
-+ uint8_t qual
-+ uint8_t l_qname
-+ uint16_t flag
-+ uint8_t unused1
-+ uint8_t l_extranul
-+ uint32_t n_cigar
-+ int32_t l_qseq
-+ int32_t mtid
-+ int32_t mpos
-+ int32_t isize
-+
-+ ctypedef struct bam1_t:
-+ bam1_core_t core
-+ int l_data
-+ uint32_t m_data
-+ uint8_t *data
-+ uint64_t id
-+
-+ bam1_t *bam_dup1(const bam1_t *bsrc)
---- a/pairtools/lib/parse_pysam.pyx
-+++ b/pairtools/lib/parse_pysam.pyx
-@@ -122,4 +122,4 @@
- read_pos)
- )
-
-- return mismatches
-\ No newline at end of file
-+ return mismatches
=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ makefile
fix-spelling
tests-to-python3
numpy-1.24.patch
+fix-pysam-ftbfs.patch
=====================================
debian/python3-pairtools-examples.install
=====================================
@@ -1,2 +1,3 @@
tests/*.py usr/share/doc/python3-pairtools/examples/tests/
tests/data/* usr/share/doc/python3-pairtools/examples/tests/data
+doc/examples/* usr/share/doc/python3-pairtools/examples/
=====================================
debian/python3-pairtools.examples deleted
=====================================
@@ -1 +0,0 @@
-examples/*
=====================================
debian/python3-pairtools.manpages deleted
=====================================
@@ -1 +0,0 @@
-./doc/_build/man/*
=====================================
debian/rules
=====================================
@@ -11,7 +11,3 @@ export PYBUILD_DESTDIR_python3=debian/python3-pairtools/
override_dh_auto_clean:
dh_auto_clean
rm -f pairtools/lib/*.c pairtools/lib/regions.cpp
-
-override_dh_auto_install:
- cd doc && make man
- dh_auto_install
=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
Tests: upstream-tests
-Depends: python3-pairtools
-Restrictions: allow-stderr, breaks-testbed
+Depends: python3-pairtools, python3-pytest
+Restrictions: allow-stderr
=====================================
debian/tests/upstream-tests
=====================================
@@ -4,6 +4,6 @@ set -ev
rm -rf pairtools
-nosetests3
+pytest-3 --ignore=.pc
echo ALL PASS
View it on GitLab: https://salsa.debian.org/med-team/pairtools/-/compare/78cc619245db7e3b17750bf42867e90f7602507e...0dffa681a006f630a432bc4731f608b057537675
--
View it on GitLab: https://salsa.debian.org/med-team/pairtools/-/compare/78cc619245db7e3b17750bf42867e90f7602507e...0dffa681a006f630a432bc4731f608b057537675
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/20221231/8509f1f5/attachment-0001.htm>
More information about the debian-med-commit
mailing list