[med-svn] [Git][med-team/python-skbio][master] 7 commits: Upgrade to cython 3.x. Closes: #1078527

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Sat Sep 28 11:31:05 BST 2024



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


Commits:
9cc0604d by Michael R. Crusoe at 2024-09-28T10:08:24+02:00
Upgrade to cython 3.x. Closes: #1078527

- - - - -
86e8cf91 by Michael R. Crusoe at 2024-09-28T11:32:59+02:00
cleanup patch metadata to work nicely with gbp pq

- - - - -
37e80fea by Michael R. Crusoe at 2024-09-28T11:35:05+02:00
Drop many unneeded patches

- - - - -
7f71d802 by Michael R. Crusoe at 2024-09-28T12:29:05+02:00
Cherry-pick patch from upstream to fix cython segmentation error

- - - - -
83fa3f57 by Michael R. Crusoe at 2024-09-28T12:29:05+02:00
Switch to pybuild-autopkgtest

- - - - -
b5f4b27e by Michael R. Crusoe at 2024-09-28T12:29:06+02:00
fixup autopkgtest

- - - - -
850f7e49 by Michael R. Crusoe at 2024-09-28T12:29:07+02:00
routine-update: Ready to upload to unstable

- - - - -


19 changed files:

- debian/changelog
- debian/control
- debian/patches/0002-use-libsww-as-library-not-embedded-src.patch
- + debian/patches/0007-Fix-cython-segmentation-error-2090.patch
- − debian/patches/cython3.patch
- debian/patches/docs-no-version-switch
- debian/patches/local_inventory
- debian/patches/mathjax-path
- − debian/patches/modify-test.patch
- debian/patches/no_privacy_breach_logo.patch
- − debian/patches/numpy-1.24.patch
- − debian/patches/older-scipy.patch
- − debian/patches/python3.12-xfail-tests.patch
- debian/patches/series
- debian/patches/use_packaged_simde
- debian/rules
- − debian/tests/control
- − debian/tests/import-skbio
- − debian/tests/testsuite


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+python-skbio (0.6.2-3) unstable; urgency=medium
+
+  * Team upload.
+  * Upgrade to cython 3.x. Closes: #1078527
+  * Cleanup patch metadata to work nicely with gbp pq
+  * Drop many unneeded patches.
+  * Cherry-pick patch from upstream to fix cython segmentation error.
+  * Switch to pybuild-autopkgtest
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Sat, 28 Sep 2024 11:37:58 +0200
+
 python-skbio (0.6.2-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -6,7 +6,7 @@ Uploaders: Andreas Tille <tille at debian.org>,
 Section: python
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
-               cython3-legacy,
+               cython3 (>= 3),
                dh-sequence-python3,
                python3-all-dev,
                python3-biom-format,
@@ -43,6 +43,7 @@ Vcs-Browser: https://salsa.debian.org/med-team/python-skbio
 Vcs-Git: https://salsa.debian.org/med-team/python-skbio.git
 Homepage: https://github.com/biocore/scikit-bio
 Rules-Requires-Root: no
+Testsuite: autopkgtest-pkg-pybuild
 
 Package: python-skbio-doc
 Architecture: all


=====================================
debian/patches/0002-use-libsww-as-library-not-embedded-src.patch
=====================================
@@ -1,11 +1,17 @@
 From: Kevin Murray <spam at kdmurray.id.au>
 Date: Tue, 15 Nov 2016 19:21:24 +1100
 Subject: use libsww as library, not embedded src
+
 Forwarded: not-needed
+---
+ setup.py | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
 
---- python-skbio.orig/setup.py
-+++ python-skbio/setup.py
-@@ -164,12 +164,6 @@
+diff --git a/setup.py b/setup.py
+index e2abb0a..7f642e0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -165,12 +165,6 @@ if platform.system() != "Windows":
          stats_extra_compile_args.extend(["-fopenmp"])
          stats_extra_link_args.extend(["-fopenmp"])
  
@@ -18,7 +24,7 @@ Forwarded: not-needed
  
  # Cython modules (*.pyx). They will be compiled into C code (*.c) during build.
  ext = ".pyx"
-@@ -177,9 +171,9 @@
+@@ -178,9 +172,9 @@ extensions = [
      Extension("skbio.metadata._intersection", ["skbio/metadata/_intersection" + ext]),
      Extension(
          "skbio.alignment._ssw_wrapper",


=====================================
debian/patches/0007-Fix-cython-segmentation-error-2090.patch
=====================================
@@ -0,0 +1,22 @@
+From: Matt Aton <matthewaton2 at gmail.com>
+Date: Mon, 8 Jul 2024 12:50:37 -0700
+Subject: Fix cython segmentation error (#2090)
+
+Origin: upstream, https://github.com/scikit-bio/scikit-bio/pull/2090
+---
+ skbio/metadata/_intersection.pyx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/skbio/metadata/_intersection.pyx b/skbio/metadata/_intersection.pyx
+index 64259e5..211afe3 100644
+--- a/skbio/metadata/_intersection.pyx
++++ b/skbio/metadata/_intersection.pyx
+@@ -94,7 +94,7 @@ cdef class IntervalNode:
+         # uniform into a binomial because it naturally scales with
+         # tree size.  Also, python's uniform is perfect since the
+         # upper limit is not inclusive, which gives us undefined here.
+-        self.priority = ceil(nlog * log(-1.0/(1.0 * rand()/(RAND_MAX + 1) - 1)))
++        self.priority = ceil(nlog * log(-1.0/(rand()/(RAND_MAX + 1.0) - 1)))
+         self.start    = start
+         self.end      = end
+         self.interval = interval


=====================================
debian/patches/cython3.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Description: Fix cython issue
-Bug-Debian: https://bugs.debian.org/1056047
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Fri, 26 Jan 2024 13:38:38 +0100
-
---- a/skbio/alignment/_ssw_wrapper.pyx
-+++ b/skbio/alignment/_ssw_wrapper.pyx
-@@ -581,7 +581,7 @@ cdef class StripedSmithWaterman:
-         # Set up our mask_length
-         # Mask is recommended to be max(query_sequence/2, 15)
-         if mask_auto:
--            self.mask_length = len(query_sequence) // 2
-+            self.mask_length = int(len(query_sequence) // 2)
-             if self.mask_length < mask_length:
-                 self.mask_length = mask_length
-         else:


=====================================
debian/patches/docs-no-version-switch
=====================================
@@ -1,5 +1,7 @@
-Author: Michael R. Crusoe
-Description: Skip the version switcher
+From: "Michael R. Crusoe" <crusoe at debian.org>
+Date: Tue, 25 Jun 2024 11:39:43 +0200
+Subject: Skip the version switcher
+
 Forwarded: not-needed
 
 We only build one version, without this patch we get the following error:
@@ -8,10 +10,15 @@ writing output... [  0%] alignment
 Theme error:
 An error happened in rendering the page alignment.
 Reason: TemplateNotFound('version-switcher.html')
+---
+ doc/source/conf.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
---- python-skbio.orig/doc/source/conf.py
-+++ python-skbio/doc/source/conf.py
-@@ -154,7 +154,7 @@
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index b95320a..35ba02c 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -154,7 +154,7 @@ html_theme_options = {
      'header_links_before_dropdown': 7,
  
      # header layout


=====================================
debian/patches/local_inventory
=====================================
@@ -1,9 +1,17 @@
-Author: Michael R. Crusoe <crusoe at debian.org>
-Description: Use Debian packages for intersphinx-links
+From: "Michael R. Crusoe" <crusoe at debian.org>
+Date: Mon, 1 Feb 2021 11:22:53 +0100
+Subject: Use Debian packages for intersphinx-links
+
 Forwarded: not-needed
---- python-skbio.orig/doc/source/conf.py
-+++ python-skbio/doc/source/conf.py
-@@ -175,12 +175,12 @@
+---
+ doc/source/conf.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index fa6a0b4..b95320a 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -175,12 +175,12 @@ html_theme_options = {
  # https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
  
  intersphinx_mapping = {


=====================================
debian/patches/mathjax-path
=====================================
@@ -1,14 +1,17 @@
 From: Kevin Murray <spam at kdmurray.id.au>
 Date: Mon, 30 Nov 2015 13:26:34 +1100
 Subject: Set mathjax path to debian's copy
+
 Forwarded: not-needed
 ---
  doc/source/conf.py | 2 ++
  1 file changed, 2 insertions(+)
 
---- python-skbio.orig/doc/source/conf.py
-+++ python-skbio/doc/source/conf.py
-@@ -44,6 +44,8 @@
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index cc3f6e6..fa6a0b4 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -44,6 +44,8 @@ extensions = [
      'matplotlib.sphinxext.plot_directive'
  ]
  


=====================================
debian/patches/modify-test.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Description: This test has some weird issue with dtype match. hence tweaking it to compare
- value and metadata match
-Author: Nilesh Patra <nilesh at debian.org>
-Last-Update: 2023-01-05
---- a/skbio/sequence/tests/test_sequence.py
-+++ b/skbio/sequence/tests/test_sequence.py
-@@ -178,7 +178,8 @@
-                 Sequence("7", positional_metadata={'a': ['i'], odd_key: [4]}),
-                 Sequence("9", positional_metadata={'a': ['o'], odd_key: [5]})
-             ], how='strict')
--        self.assertEqual(result, expected)
-+        self.assertEqual(str(result), str(expected))
-+        self.assertEqual(result.metadata, expected.metadata)
-         self.assertFalse(result.metadata)
- 
-     def test_concat_strict_fail(self):


=====================================
debian/patches/no_privacy_breach_logo.patch
=====================================
@@ -1,10 +1,18 @@
-Description: Remove privacy breaching logo
-Author: Andreas Tille <tille at debian.org>
+From: Andreas Tille <tille at debian.org>
+Date: Fri, 6 Oct 2017 21:22:14 +0200
+Subject: Remove privacy breaching logo
+
 Last-Update: Fri, 06 Oct 2017 21:13:24 +0200
 Forwarded: not-needed
---- python-skbio.orig/README.rst
-+++ python-skbio/README.rst
-@@ -125,27 +125,11 @@
+---
+ README.rst | 32 ++++++++------------------------
+ 1 file changed, 8 insertions(+), 24 deletions(-)
+
+diff --git a/README.rst b/README.rst
+index 7bf016e..ff9a0d6 100644
+--- a/README.rst
++++ b/README.rst
+@@ -125,27 +125,11 @@ scikit-bio began from code derived from `PyCogent <https://github.com/pycogent/p
  - Rob Knight (@rob-knight), Gavin Huttley (@gavinhuttley), Daniel McDonald (@wasade), Micah Hamady, Antonio Gonzalez (@antgonza), Sandra Smit, Greg Caporaso (@gregcaporaso), Jai Ram Rideout (@jairideout), Cathy Lozupone (@clozupone), Mike Robeson (@mikerobeson), Marcin Cieslik, Peter Maxwell, Jeremy Widmann, Zongzhi Liu, Michael Dwan, Logan Knecht (@loganknecht), Andrew Cochran, Jose Carlos Clemente (@cleme), Damien Coy, Levi McCracken, Andrew Butterfield, Will Van Treuren (@wdwvt1), Justin Kuczynski (@justin212k), Jose Antonio Navas Molina (@josenavas), Matthew Wakefield (@genomematt) and Jens Reeder (@jensreeder).
  
  


=====================================
debian/patches/numpy-1.24.patch deleted
=====================================
@@ -1,20 +0,0 @@
-Description: Adapt to numpy 1.24
-Bug-Debian: https://bugs.debian.org/1029452
-Author: Nilesh Patra <nilesh at debian.org>
-Last-Update: 2023-01-25 20:55:34 +0530
-Forwarded: https://github.com/biocore/scikit-bio/issues/1839
-
---- python-skbio.orig/skbio/alignment/_indexing.py
-+++ python-skbio/skbio/alignment/_indexing.py
-@@ -115,7 +115,10 @@
-         if isinstance(indexable, np.ndarray):
-             pass
-         elif hasattr(indexable, "__iter__"):
--            indexable = np.asarray(list(indexable))
-+            try:
-+                indexable = np.asarray(list(indexable))
-+            except:
-+                indexable = np.asarray(list(indexable), dtype='object')
-         else:
-             return indexable
- 


=====================================
debian/patches/older-scipy.patch deleted
=====================================
@@ -1,46 +0,0 @@
-Description: Revert scipy changes that use functionalities with 1.9.0 version as we
- currently have 1.8.1 in debian
-Author: Nilesh Patra <nilesh at debian.org>
-Forwarded: not-needed
-Last-Update: 2023-01-05
---- a/skbio/stats/distance/_mantel.py
-+++ b/skbio/stats/distance/_mantel.py
-@@ -13,8 +13,9 @@
- import pandas as pd
- import scipy.special
- from scipy.stats import kendalltau
--from scipy.stats import ConstantInputWarning
--from scipy.stats import NearConstantInputWarning
-+from scipy.stats import PearsonRConstantInputWarning
-+from scipy.stats import PearsonRNearConstantInputWarning
-+from scipy.stats import SpearmanRConstantInputWarning
- 
- from skbio.stats.distance import DistanceMatrix
- from skbio.util._decorator import experimental
-@@ -351,7 +352,7 @@
- 
-     # If an input is constant, the correlation coefficient is not defined.
-     if (x_flat == x_flat[0]).all() or (y_flat == y_flat[0]).all():
--        warnings.warn(ConstantInputWarning())
-+        warnings.warn(PearsonRConstantInputWarning())
-         return np.nan, np.nan, []
- 
-     # inline pearsonr, condensed from scipy.stats.pearsonr
-@@ -374,7 +375,7 @@
-         # If all the values in x (likewise y) are very close to the mean,
-         # the loss of precision that occurs in the subtraction xm = x - xmean
-         # might result in large errors in r.
--        warnings.warn(NearConstantInputWarning())
-+        warnings.warn(PearsonRNearConstantInputWarning())
- 
-     orig_stat = np.dot(xm_normalized, ym_normalized)
- 
-@@ -470,7 +471,7 @@
- 
-     # If an input is constant, the correlation coefficient is not defined.
-     if (x_flat == x_flat[0]).all() or (y_flat == y_flat[0]).all():
--        warnings.warn(ConstantInputWarning())
-+        warnings.warn(SpearmanRConstantInputWarning())
-         return np.nan, np.nan, []
- 
-     y_rank = scipy.stats.rankdata(y_flat)


=====================================
debian/patches/python3.12-xfail-tests.patch deleted
=====================================
@@ -1,48 +0,0 @@
-Description: xfail tests known to fail with Python 3.12
-Bug: https://github.com/scikit-bio/scikit-bio/issues/1897
-Bug-Debian: https://bugs.debian.org/1056047
-Author: Graham Inggs <ginggs at debian.org>
-Last-Update: 2023-11-20
-
---- python-skbio.orig/skbio/io/tests/test_util.py
-+++ python-skbio/skbio/io/tests/test_util.py
-@@ -11,6 +11,7 @@
- import shutil
- import io
- import os.path
-+import pytest
- import gc
- 
- try:
-@@ -348,6 +349,7 @@
-         self.assertEqual(self.get_contents(self.binary_file),
-                          self.binary_contents)
- 
-+    @pytest.mark.xfail
-     def test_open_gzip(self):
-         self.check_open_state_contents(self.gzip_file, self.text_contents,
-                                        False, compression='gzip')
-@@ -373,6 +375,7 @@
-             .encode(encoding="big5"),
-             self.encoded_contents)
- 
-+    @pytest.mark.xfail
-     def test_open_gzip_encoding(self):
-         self.check_open_state_contents(self.gzip_encoded_file,
-                                        self.decoded_contents, False,
-@@ -503,6 +506,7 @@
-     def get_contents(self, file):
-         return file.getvalue()
- 
-+    @pytest.mark.xfail
-     def test_open_gzip(self):
-         self.check_open_state_contents(self.gzip_file, self.text_contents,
-                                        False, compression='gzip')
-@@ -510,6 +514,7 @@
-         self.compare_gzip_file_contents(self.get_contents(self.gzip_file),
-                                         self.gzip_contents)
- 
-+    @pytest.mark.xfail
-     def test_open_gzip_encoding(self):
-         self.check_open_state_contents(self.gzip_encoded_file,
-                                        self.decoded_contents, False,


=====================================
debian/patches/series
=====================================
@@ -3,9 +3,5 @@ mathjax-path
 0002-use-libsww-as-library-not-embedded-src.patch
 no_privacy_breach_logo.patch
 local_inventory
-#older-scipy.patch
-modify-test.patch
-numpy-1.24.patch
-python3.12-xfail-tests.patch
-cython3.patch
 docs-no-version-switch
+0007-Fix-cython-segmentation-error-2090.patch


=====================================
debian/patches/use_packaged_simde
=====================================
@@ -1,8 +1,17 @@
-Author: Michael R. Crusoe <crusoe at debian.org>
-Description: Use libsimde-dev instead of the code copy
+From: "Michael R. Crusoe" <crusoe at debian.org>
+Date: Sun, 12 Feb 2023 11:04:32 +0100
+Subject: Use libsimde-dev instead of the code copy
+
 Forwarded: not-needed
---- python-skbio.orig/skbio/alignment/_lib/ssw.c
-+++ python-skbio/skbio/alignment/_lib/ssw.c
+---
+ skbio/alignment/_lib/ssw.c | 2 +-
+ skbio/alignment/_lib/ssw.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/skbio/alignment/_lib/ssw.c b/skbio/alignment/_lib/ssw.c
+index e0a7816..cd4bf93 100644
+--- a/skbio/alignment/_lib/ssw.c
++++ b/skbio/alignment/_lib/ssw.c
 @@ -36,7 +36,7 @@
   */
  
@@ -12,8 +21,10 @@ Forwarded: not-needed
  #include <stdint.h>
  #include <stdlib.h>
  #include <stdio.h>
---- python-skbio.orig/skbio/alignment/_lib/ssw.h
-+++ python-skbio/skbio/alignment/_lib/ssw.h
+diff --git a/skbio/alignment/_lib/ssw.h b/skbio/alignment/_lib/ssw.h
+index 3ace71f..2d8e252 100644
+--- a/skbio/alignment/_lib/ssw.h
++++ b/skbio/alignment/_lib/ssw.h
 @@ -15,7 +15,7 @@
  #include <stdint.h>
  #include <string.h>


=====================================
debian/rules
=====================================
@@ -7,6 +7,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 export DEB_CPPFLAGS_MAINT_APPEND = -I$(CURDIR)
 
 export PYBUILD_NAME=skbio
+export PYBUILD_TEST_ARGS=--pyargs skbio
 export MPLBACKEND=agg
 DOCPKG=python-$(PYBUILD_NAME)-doc
 export USE_CYTHON=1


=====================================
debian/tests/control deleted
=====================================
@@ -1,3 +0,0 @@
-Tests: import-skbio testsuite
-Depends: python3-skbio, python3-pytest
-Restrictions: allow-stderr


=====================================
debian/tests/import-skbio deleted
=====================================
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-cd /tmp
-echo "backend: agg" > matplotlibrc
-
-python3 -c 'import skbio'
-
-rm -f matplotlibrc


=====================================
debian/tests/testsuite deleted
=====================================
@@ -1,23 +0,0 @@
-#!/bin/sh
-set -e
-
-pkg=skbio
-
-export LC_ALL=C.UTF-8
-if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
-  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
-  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
-fi
-
-cd ${AUTOPKGTEST_TMP}
-cp -a /usr/lib/python3/dist-packages/${pkg} .
-
-echo "backend: agg" > matplotlibrc
-
-set -x
-# just remove tests that are failing for unknown reasons
-# The patch 9c061da7e2746aee403b41621f71b118ce5c52f8.patch works in build time test but fails in autopkgtest
-find . -name _hommola.py -exec sed -i '/Run the cospeciation test with 99 permutations. Note that the correlation/,/After permuting host : parasite interactions, we find that the observed/d' \{\} \;
-find . -name power.py -exec sed -i "/Now, let's use random sampling to estimate the power of our test on/,/Based on this power estimate, as we increase our confidence that we have not/d" \{\} \;
-
-http_proxy='http://127.0.0.1:9' python3 -m pytest --pyargs skbio



View it on GitLab: https://salsa.debian.org/med-team/python-skbio/-/compare/910c5ab7ab6b6fa0f4fc02dc01a4a36de788e56b...850f7e49b391f1a85ef748652730c90969ad66fb

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-skbio/-/compare/910c5ab7ab6b6fa0f4fc02dc01a4a36de788e56b...850f7e49b391f1a85ef748652730c90969ad66fb
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/20240928/7ac6b787/attachment-0001.htm>


More information about the debian-med-commit mailing list