[med-svn] [Git][med-team/python-biopython][master] 3 commits: arm64 patch from upstream to fix the PairwiseAligner

Michael R. Crusoe gitlab at salsa.debian.org
Sun Dec 15 13:06:22 GMT 2019



Michael R. Crusoe pushed to branch master at Debian Med / python-biopython


Commits:
5ba0c16d by Michael R. Crusoe at 2019-12-15T08:46:50Z
arm64 patch from upstream to fix the PairwiseAligner

- - - - -
420cf81a by Michael R. Crusoe at 2019-12-15T12:01:03Z
fix the Bio.Cluster._cluster doctests

- - - - -
361e5091 by Michael R. Crusoe at 2019-12-15T12:14:01Z
samtools now available everywhere

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/arm.patch
- + debian/patches/fix_doctests
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -9,8 +9,9 @@ python-biopython (1.75+dfsg-2) UNRELEASED; urgency=medium
   * Added missing test dependencies: python-unittest2, python{,3}-networkx,
     samtools
   * i386: build-dep on raxml for testing purposes
-  * Fix the ignoring of the test errors so that the python3 tests are still
-    run.
+  * debian/patches/arm64.patch from upstream to fix the PairwiseAligner
+  * debian/patches/fix_doctest: from me to fix the Bio.Cluster._cluster doctests
+    Now the tests are required to pass again.
 
   [ Andreas Tille ]
   * Drop Python2 package


=====================================
debian/control
=====================================
@@ -39,7 +39,7 @@ Build-Depends: debhelper-compat (= 12),
                python3-setuptools,
                python3-unittest2,
                raxml [any-amd64 any-i386],
-               samtools [alpha arm64 armel armhf hppa ia64 m68k mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc64],
+               samtools,
                t-coffee,
                wise,
                python3-pygments


=====================================
debian/patches/arm.patch
=====================================
@@ -0,0 +1,53 @@
+Origin: https://github.com/biopython/biopython/pull/2402
+Author: Michiel de Hoon <mjldehoon at yahoo.com>
+Description: use signed char for mapping
+diff --git a/Bio/Align/_aligners.c b/Bio/Align/_aligners.c
+index 5cce71c5f7..bd9ce01859 100644
+--- a/Bio/Align/_aligners.c
++++ b/Bio/Align/_aligners.c
+@@ -1698,7 +1698,7 @@ typedef struct {
+     PyObject* query_gap_function;
+     Py_buffer substitution_matrix;
+     PyObject* alphabet;
+-    char mapping[256];
++    signed char mapping[256];
+ } Aligner;
+ 
+ 
+@@ -2025,7 +2025,7 @@ Aligner_set_substitution_matrix(Aligner* self, PyObject* values, void* closure)
+     alphabet = PyObject_GetAttrString(values, "alphabet");
+     if (alphabet) {
+         int i;
+-        char* mapping = self->mapping;
++        signed char* mapping = self->mapping;
+ #if PY_MAJOR_VERSION > 2
+         if (PyUnicode_Check(alphabet)) {
+             const char* characters = PyUnicode_AsUTF8AndSize(alphabet, &size);
+@@ -2081,7 +2081,7 @@ Aligner_set_alphabet(Aligner* self, PyObject* alphabet, void* closure)
+ {
+     int i, j;
+     Py_ssize_t size = -1;
+-    char* mapping = self->mapping;
++    signed char* mapping = self->mapping;
+     if (self->substitution_matrix.obj) {
+         PyErr_SetString(PyExc_AttributeError,
+             "can't set alphabet if a substitution matrix is used");
+@@ -6283,7 +6283,8 @@ Aligner_watermansmithbeyer_local_align_matrix(Aligner* self,
+ }
+ 
+ static int*
+-convert_sequence_to_ints(const char mapping[], Py_ssize_t n, const char s[])
++convert_sequence_to_ints(const signed char mapping[], Py_ssize_t n,
++                         const char s[])
+ {
+     char c;
+     Py_ssize_t i;
+@@ -6382,7 +6383,7 @@ sequence_converter(PyObject* argument, void* pointer)
+ #endif
+     const int flag = PyBUF_FORMAT | PyBUF_C_CONTIGUOUS;
+     Aligner* aligner;
+-    char* mapping;
++    signed char* mapping;
+ 
+     if (argument == NULL) {
+         if (view->obj) PyBuffer_Release(view);


=====================================
debian/patches/fix_doctests
=====================================
@@ -0,0 +1,55 @@
+From: Michael R. Crusoe <michael.crusoe at gmail.com>
+Subject: Fix Bio.Cluster._cluster doctests
+--- python-biopython.orig/Bio/Cluster/clustermodule.c
++++ python-biopython/Bio/Cluster/clustermodule.c
+@@ -1438,16 +1438,17 @@
+ "\n"
+ "   Examples are:\n"
+ "\n"
++"       >>> from numpy import array\n"
+ "       >>> distance = array([[0.0, 1.1, 2.3],\n"
+ "       ...                   [1.1, 0.0, 4.5],\n"
+ "       ...                   [2.3, 4.5, 0.0]])\n"
+-"       (option #1)\n"
++"       >>> # (option #1)\n"
+ "       >>> distance = array([1.1, 2.3, 4.5])\n"
+-"       (option #2)\n"
++"       >>> # (option #2)\n"
+ "       >>> distance = [array([]),\n"
+ "       ...             array([1.1]),\n"
+ "       ...             array([2.3, 4.5])]\n"
+-"       (option #3)\n"
++"       >>> # (option #3)\n"
+ "\n"
+ "   These three correspond to the same distance matrix.\n"
+ "\n"
+@@ -1596,16 +1597,17 @@
+ "\n"
+ "   Examples are:\n"
+ "\n"
++"       >>> from numpy import array\n"
+ "       >>> distance = array([[0.0, 1.1, 2.3],\n"
+ "       ...                   [1.1, 0.0, 4.5],\n"
+ "       ...                   [2.3, 4.5, 0.0]])\n"
+-"       # option 1.\n"
++"       >>> # option 1.\n"
+ "       >>> distance = array([1.1, 2.3, 4.5])\n"
+-"       # option 2.\n"
++"       >>> # option 2.\n"
+ "       >>> distance = [array([]),\n"
+ "       ...             array([1.1]),\n"
+ "       ...             array([2.3, 4.5])]\n"
+-"       # option 3.\n"
++"       >>> # option 3.\n"
+ "\n"
+ "   These three correspond to the same distance matrix.\n"
+ "\n"
+@@ -2318,7 +2320,7 @@
+ "Adding the column means to the dot product of the coordinates and the\n"
+ "principal components, i.e.\n"
+ "\n"
+-"    >>> columnmean + dot(coordinates, pc)\n"
++"   'columnmean + dot(coordinates, pc)'\n"
+ "\n"
+ "recreates the data matrix.\n";
+ 


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,5 @@ reportlab3.5.patch
 python_3.8_iteration_fix.patch
 # 5af680b5043c9f160a19e4bb0deab0ccc271280d.patch
 exclude_docstring_tests.patch
+arm.patch
+fix_doctests


=====================================
debian/rules
=====================================
@@ -107,7 +107,7 @@ else
                              cp -a Doc/examples {build_dir}/Doc; \
                              cp -a Tests {build_dir}; \
                              cd {build_dir}/Tests; \
-                             env DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss HOME={build_dir}/home {interpreter} run_tests.py --offline || true'
+                             env DIALIGN2_DIR=/usr/share/dialign EMBOSS_ROOT=/usr/lib/emboss HOME={build_dir}/home {interpreter} run_tests.py --offline'
 	mv Tests_avoid/* Tests
 	rmdir Tests_avoid
 endif



View it on GitLab: https://salsa.debian.org/med-team/python-biopython/compare/0a768f257b583e714af82d5a96c2de09960d703a...361e50911aca15d399f86f5a435e92c372e539a2

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-biopython/compare/0a768f257b583e714af82d5a96c2de09960d703a...361e50911aca15d399f86f5a435e92c372e539a2
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/20191215/1d385a7e/attachment-0001.html>


More information about the debian-med-commit mailing list