[med-svn] [Git][med-team/python-biom-format][master] 11 commits: d/watch: converto to v5 Github template.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Tue Nov 4 20:42:18 GMT 2025



Étienne Mollier pushed to branch master at Debian Med / python-biom-format


Commits:
906c25ee by Étienne Mollier at 2025-11-04T21:06:03+01:00
d/watch: converto to v5 Github template.

- - - - -
5a325f7c by Étienne Mollier at 2025-11-04T21:06:25+01:00
New upstream version 2.1.17
- - - - -
b30abb05 by Étienne Mollier at 2025-11-04T21:06:58+01:00
Update upstream source from tag 'upstream/2.1.17'

Update to upstream version '2.1.17'
with Debian dir ba27c95e2474edc496f2d2a515b4c72c55dcb9c3
- - - - -
60ee15c2 by Étienne Mollier at 2025-11-04T21:08:22+01:00
d/copyright: bump upstream copyright year.

- - - - -
ae55715c by Étienne Mollier at 2025-11-04T21:08:44+01:00
d/control: drop redundant Rules-Requires-Root: no.

- - - - -
872de739 by Étienne Mollier at 2025-11-04T21:09:14+01:00
d/control: declare compliance to standards version 4.7.2.

- - - - -
03d1c53b by Chris Lamb at 2025-11-04T21:17:23+01:00
d/rules: remove examples from dist-packages.

This makes the build reproducible.

Signed-off-by: Étienne Mollier <emollier at debian.org>

- - - - -
d1a3365d by Étienne Mollier at 2025-11-04T21:18:35+01:00
d/copyright: remove reference to the old fsf address.

- - - - -
0205847a by Étienne Mollier at 2025-11-04T21:20:12+01:00
d/patches/*: normalize Last-Update timestamps.

- - - - -
33a0d183 by Étienne Mollier at 2025-11-04T21:39:07+01:00
d/{rules,control}: streamline dh_numpy3 integration.

This addresses supplemental comments in #1102990.

- - - - -
7de36b5e by Étienne Mollier at 2025-11-04T21:41:08+01:00
d/changelog: ready for upload to unstable.

- - - - -


24 changed files:

- .github/workflows/python-package-conda.yml
- .github/workflows/release.yml
- + .github/workflows/wheels.yml
- ChangeLog.md
- Makefile
- − aarch64.Dockerfile
- biom/table.py
- biom/util.py
- − ci/aarch64.conda_requirements.txt
- debian/changelog
- debian/control
- debian/copyright
- debian/patches/fix_future_import.patch
- debian/patches/ignore_local_dist-packages.patch
- debian/patches/no-web-adds.patch
- debian/patches/posix_shell.patch
- debian/patches/sphinx_1.6.patch
- debian/rules
- debian/watch
- doc/conf.py
- pyproject.toml
- − pytest.ini
- − setup.cfg
- setup.py


Changes:

=====================================
.github/workflows/python-package-conda.yml
=====================================
@@ -9,9 +9,9 @@ on:
     branches: [ master ]
 
 env:
-  latest_python: "3.12"
-  supported_pythons: '["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'
-  miniforge_version: "22.9.0-2"
+  latest_python: "3.13"
+  supported_pythons: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
+  miniforge_version: "23.11.0-0"
   miniforge_variant: "Mambaforge"
 
 jobs:
@@ -35,7 +35,7 @@ jobs:
     runs-on: "ubuntu-latest"
     steps:
       - uses: actions/checkout at v4
-      - uses: conda-incubator/setup-miniconda at v2
+      - uses: conda-incubator/setup-miniconda at v3
         with:
           auto-update-conda: true
           python-version: ${{ env.latest_python }}
@@ -57,7 +57,7 @@ jobs:
     runs-on: "ubuntu-latest"
     steps:
       - uses: actions/checkout at v4
-      - uses: conda-incubator/setup-miniconda at v2
+      - uses: conda-incubator/setup-miniconda at v3
         with:
           auto-update-conda: true
           python-version: ${{ env.latest_python }}
@@ -81,12 +81,12 @@ jobs:
     strategy:
       fail-fast: true
       matrix:
-        os: ["ubuntu-latest", "macos-latest", "windows-latest"]
+        os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm, macos-13]
         python_version: ${{ fromJSON(needs.conf.outputs.supported_pythons) }}
         use_conda: [true, false]
     steps:
       - uses: actions/checkout at v4
-      - uses: conda-incubator/setup-miniconda at v2
+      - uses: conda-incubator/setup-miniconda at v3
         with:
           auto-update-conda: true
           python-version: ${{ matrix.python_version }}
@@ -98,39 +98,14 @@ jobs:
         shell: bash -l {0}
         run: |
           conda install -q --yes -c conda-forge --file ci/conda_requirements.txt
-          pip install . --no-deps
+          pip install -e . --no-deps
           conda list
       - name: Install dependencies (pip)
         if: ${{ !matrix.use_conda }}
         shell: bash -l {0}
         run: |
-          pip install .
+          pip install -e .
           conda list
       - name: Run unit tests
         shell: bash -l {0}
         run: make test
-  
-  test-aarch64:
-    name: Test (${{ needs.conf.outputs.latest_python }}, qemu::aarch64-centos)
-    needs: ["conf", "lint", "doc", "test-all"]
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout at v4
-        # setup-buildx-action uses the git context directly
-        # but checklist wants the .git directory
-      - name: Set up QEMU
-        id: qemu
-        uses: docker/setup-qemu-action at v1
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action at v1
-      - name: Build and test for linux-aarch64
-        id: docker_build
-        uses: docker/build-push-action at v2
-        with:
-          context: .
-          # ^ to use the local checkout, not the git context
-          file: aarch64.Dockerfile
-          cache-from: type=gha
-          cache-to: type=gha,mode=max
-          build-args: |
-            PYTHON_VERSION=${{ env.latest_python }}


=====================================
.github/workflows/release.yml
=====================================
@@ -5,124 +5,8 @@ on:
     tags:
       - '*'
 
-env:
-  earliest_python: "3.8"
-  latest_python: "3.12"
-  miniforge_version: "23.11.0-0"
-  miniforge_variant: "Mambaforge"
-
 jobs:
-  release:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout at v2
-      - name: Set up Python 3.8
-        uses: actions/setup-python at v2
-        with:
-          python-version: 3.8
-      - name: Build distribution
-        run: |
-          # set version from '${{ github.ref_name }}'
-          export RELEASE_VERSION=${{ github.ref_name }}
-          pip install numpy cython
-          python setup.py sdist
-
-      - name: Publish a Python distribution to PyPI
-        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
-        uses: pypa/gh-action-pypi-publish at release/v1
-        with:
-          user: __token__
-          password: ${{ secrets.PYPI_API_TOKEN }}
-
-# wheels are not working
-# cutting them out did not "just" work
-# getting a release out right now is more important than
-# precompiled builds.
-  #jobs:
-  #  build_sdist:
-  #    name: Build sdist
-  #    runs-on: ubuntu-latest
-  #    steps:
-  #      - uses: actions/checkout at v4
-  #
-  #      - name: Build distribution
-  #        run: |
-  #          pip install numpy cython
-  #          pipx run build --sdist
-  #
-  #      - uses: actions/upload-artifact at v4
-  #        with:
-  #          name: cibw-sdist
-  #          path: dist/*.tar.gz
-  #
-  #  # adapted from 
-  #  # https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
-  #  build_wheels:
-  #    name: Build wheels (py ${{ matrix.pyver }}) ${{ matrix.os }}
-  #    runs-on: ${{ matrix.os }}
-  #    strategy:
-  #      matrix:
-  #        os: [ubuntu-latest, macos-13, macos-14]
-  #        pyver: ["37", "38", "39", "310", "311", "312"]
-  #
-  #    steps:
-  #      - uses: actions/checkout at v4
-  #
-  #      - name: Install Python packaging tools
-  #        run: |
-  #          pip install numpy cython
-  #          python -m pip install --upgrade pip setuptools wheel
-  #
-  #      - name: Build wheels (py ${{ matrix.pyver }}) Linux
-  #        if: matrix.os == 'ubuntu-latest' 
-  #        env:
-  #          CIBW_ARCHS_LINUX: "x86_64 aarch64"
-  #          CIBW_SKIP: "*-musllinux*"
-  #          CIBW_BUILD: "cp${{ matrix.pyver }}-*"
-  #
-  #        uses: pypa/cibuildwheel at v2.17.0
-  #      
-  #      - name: Build wheels (py ${{ matrix.pyver }}) MacOS
-  #        if: matrix.os == 'macos-latest'
-  #        env:
-  #          CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
-  #          CIBW_BUILD: "cp${{ matrix.pyver }}-*"
-  #
-  #        uses: pypa/cibuildwheel at v2.17.0
-  #
-  #      - name: Build wheels (py ${{ matrix.pyver }}) Windows
-  #        if: matrix.os == 'windows-latest'
-  #        env:
-  #          CIBW_ARCHS_WINDOWS: "amd64 win32"
-  #          CIBW_BUILD: "cp${{ matrix.pyver }}-*"
-  #
-  #        uses: pypa/cibuildwheel at v2.17.0
-  #
-  #      - uses: actions/upload-artifact at v4
-  #        with:
-  #          name: cibw-wheels-${{ matrix.os }}-${{ matrix.pyver }}-${{ strategy.job-index }}
-  #          path: ./wheelhouse/*.whl
-  #
-  #  release:
-  #    needs: [build_wheels, build_sdist]
-  #    runs-on: ubuntu-latest
-  #    environment: pypi
-  #    permissions:
-  #      id-token: write
-  #
-  #    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
-  #    steps:
-  #      - uses: actions/download-artifact at v4
-  #        with:
-  #          name: cibw-*
-  #          path: dist
-  #          merge-multiple: true
-  #      
-  #      - name: Check artifacts
-  #        run: ls -lrt dist/
-  #
-  #      - name: Publish Distribution
-  #        uses: pypa/gh-action-pypi-publish at v1.5.0
-  #        with:
-  #          user: __token__
-  #          password: ${{ secrets.PYPI_API_TOKEN }}
+  build_and_publish:
+    name: Build and publish to PyPI
+    uses: ./.github/workflows/wheels.yml
+    secrets: inherit


=====================================
.github/workflows/wheels.yml
=====================================
@@ -0,0 +1,97 @@
+name: Build Wheels
+
+on:
+  pull_request:
+    branches: [ master ]
+    paths:
+      - 'setup.py'
+      - 'pyproject.toml'
+      - 'biom/*.pyx'
+      - '.github/workflows/wheels.yml'
+      - '.github/workflows/release.yml'
+  workflow_call:
+  workflow_dispatch:
+
+jobs:
+  build_wheels:
+    name: Build wheels on ${{ matrix.os }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
+        # The 5 runners correspond to 5 architectures. Details:
+        # https://cibuildwheel.pypa.io/en/stable/options/#archs
+        # The runners and architectures should be automatically associated. However, in
+        # case not in the future, they can be manually specified as follows:
+        # include:
+        #   - os: ubuntu-latest
+        #     cibw_archs: 'x86_64'
+        #   - os: ubuntu-24.04-arm
+        #     cibw_archs: 'aarch64'
+        #   - os: windows-latest
+        #     cibw_archs: 'AMD64'
+        #   - os: macos-13
+        #     cibw_archs: 'x86_64'
+        #   - os: macos-latest
+        #     cibw_archs: 'arm64'
+
+    steps:
+      - uses: actions/checkout at v4
+        with:
+          submodules: true
+
+      - name: Build wheels
+        uses: pypa/cibuildwheel at v2.23.3
+
+      - uses: actions/upload-artifact at v4
+        with:
+          name: wheels-${{ matrix.os }}-${{ strategy.job-index }}
+          path: ./wheelhouse/*.whl
+
+  build_sdist:
+    name: Build source distribution
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout at v4
+        with:
+          submodules: true
+
+      - name: Set up Python
+        uses: actions/setup-python at v5
+        with:
+          python-version: '3.9'
+
+      - name: Install build dependencies
+        run: |
+          pip install numpy cython build
+
+      - name: Build sdist
+        run: python -m build --sdist
+
+      - uses: actions/upload-artifact at v4
+        with:
+          name: sdist
+          path: dist/*.tar.gz
+
+  upload_pypi:
+    needs: [build_wheels, build_sdist]
+    runs-on: ubuntu-latest
+    # Only upload to PyPI on tagged commits
+    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
+    steps:
+      - uses: actions/download-artifact at v4
+        with:
+          pattern: wheels-*
+          path: dist
+          merge-multiple: true
+
+      - uses: actions/download-artifact at v4
+        with:
+          name: sdist
+          path: dist
+
+      - name: Publish to PyPI
+        uses: pypa/gh-action-pypi-publish at release/v1
+        with:
+          user: __token__
+          password: ${{ secrets.PYPI_API_TOKEN }}


=====================================
ChangeLog.md
=====================================
@@ -1,6 +1,20 @@
 BIOM-Format ChangeLog
 =====================
 
+biom-2.1.17
+-----------
+
+Maintenance and build release, July 10th 2025.
+
+General Maintenance:
+
+* Python 3.7 and 3.8 removed from CI as they are [end-of-life](https://devguide.python.org/versions/). Python 3.13 added to CI. See PR[#986](https://github.com/biocore/biom-format/pull/986).
+* Construct wheels for pypi, see PR[#996](https://github.com/biocore/biom-format/pull/996)
+
+Performance improvements:
+
+* Decreased execution time of `import biom` by half with lazy imports. See PR[#987](https://github.com/biocore/biom-format/pull/987)
+
 biom 2.1.16
 -----------
 


=====================================
Makefile
=====================================
@@ -7,9 +7,9 @@
 # ----------------------------------------------------------------------------
 
 ifeq ($(WITH_DOCTEST), TRUE)
-	TEST_COMMAND = python setup.py test -a --doctest-modules --doctest-glob='*.pyx'
+	TEST_COMMAND = pytest --doctest-modules --doctest-glob='*.pyx'
 else
-	TEST_COMMAND = python setup.py test 
+	TEST_COMMAND = pytest
 endif
 
 .PHONY: doc lint test
@@ -19,7 +19,7 @@ test:
 	sh usage_tests.sh
 
 lint:
-	flake8 biom setup.py
+	flake8 biom setup.py --exclude=biom/tests/long_lines.py
 
 doc:
 	$(MAKE) -C doc clean html


=====================================
aarch64.Dockerfile deleted
=====================================
@@ -1,15 +0,0 @@
-# this Dockerfile is directly adapted from
-# https://github.com/biocore/scikit-bio/blob/31123c6471dc62f45a55bfdff59c61a4850be367/aarch64.Dockerfile#LL1C1-L16C89
-FROM --platform=linux/arm64 condaforge/linux-anvil-aarch64
-RUN sudo yum update -y && \
-	sudo yum install -y make git && \
-	sudo yum clean all
-ARG PYTHON_VERSION
-RUN bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate base && conda create -n testing -c conda-forge --yes python=$PYTHON_VERSION gxx_linux-aarch64"
-COPY . /work
-WORKDIR /work
-RUN bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate testing && conda env update -q -f ci/conda_host_env.yml"
-RUN bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate testing && conda install -q --yes --file ci/aarch64.conda_requirements.txt"
-RUN bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate testing && pip install . --no-deps"
-RUN bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate testing && conda list"
-RUN bash -c ". /opt/conda/etc/profile.d/conda.sh && conda activate testing && make test"


=====================================
biom/table.py
=====================================
@@ -172,8 +172,6 @@ Bacteria; Bacteroidetes   1.0 1.0 0.0 1.0
 # -----------------------------------------------------------------------------
 
 import numpy as np
-import scipy.stats
-import h5py
 from copy import deepcopy
 from datetime import datetime
 from json import dumps as _json_dumps, JSONEncoder
@@ -184,7 +182,6 @@ from collections.abc import Hashable, Iterable
 from numpy import ndarray, asarray, zeros, newaxis
 from scipy.sparse import (coo_matrix, csc_matrix, csr_matrix, isspmatrix,
                           vstack, hstack, dok_matrix)
-import pandas as pd
 import re
 from biom.exception import (TableException, UnknownAxisError, UnknownIDError,
                             DisjointIDError)
@@ -398,7 +395,7 @@ class Table:
     versions 2.0 and 2.1 are based on HDF5. For more information see [1]_
     and [2]_
 
-    Paramaters
+    Parameters
     ----------
     data : array_like
         An (N,M) sample by observation matrix represented as one of these
@@ -3234,6 +3231,8 @@ class Table:
         o4	1.0	4.0	1.0
 
         """
+        import scipy.stats
+
         def f(val, id_, _):
             return scipy.stats.rankdata(val, method=method)
         return self.transform(f, axis=axis, inplace=inplace)
@@ -4108,6 +4107,7 @@ html
         >>>     t = Table.from_hdf5(f, ids=["GG_OTU_1"],
         ...                         axis='observation') # doctest: +SKIP
         """
+        import h5py
         if not isinstance(h5grp, (h5py.Group, h5py.File)):
             raise ValueError("h5grp does not appear to be an HDF5 file or "
                              "group")
@@ -4341,6 +4341,7 @@ html
         index = self.ids(axis='observation')
         columns = self.ids()
 
+        import pandas as pd
         if dense:
             mat = self.matrix_data.toarray()
             constructor = pd.DataFrame
@@ -4442,6 +4443,7 @@ html
         O1   Bacteria     Firmicutes
         O2   Bacteria  Bacteroidetes
         """
+        import pandas as pd
         md = self.metadata(axis=axis)
         if md is None:
             raise KeyError("%s does not have metadata" % axis)


=====================================
biom/util.py
=====================================
@@ -41,7 +41,7 @@ __url__ = "http://biom-format.org"
 __maintainer__ = "Daniel McDonald"
 __email__ = "daniel.mcdonald at colorado.edu"
 __format_version__ = (2, 1)
-__version__ = "2.1.16"
+__version__ = "2.1.17"
 
 
 def generate_subsamples(table, n, axis='sample', by_id=False):


=====================================
ci/aarch64.conda_requirements.txt deleted
=====================================
@@ -1,7 +0,0 @@
-numpy >= 1.9.2
-pandas >= 0.20.0
-scipy >= 1.3.1
-h5py >= 2.2.0
-anndata
-click
-cython


=====================================
debian/changelog
=====================================
@@ -1,3 +1,22 @@
+python-biom-format (2.1.17-1) unstable; urgency=medium
+
+  [ Étienne Mollier ]
+  * New upstream version 2.1.17
+  * d/watch: converto to v5 Github template.
+  * d/copyright: bump upstream copyright year.
+  * d/control: drop redundant Rules-Requires-Root: no.
+  * d/control: declare compliance to standards version 4.7.2.
+  * d/copyright: remove reference to the old fsf address.
+  * d/patches/*: normalize Last-Update timestamps.
+  * d/{rules,control}: streamline dh_numpy3 integration.
+    This addresses supplemental comments in #1102990.
+
+  [ Chris Lamb ]
+  * d/rules: remove examples from dist-packages.
+    This makes the build reproducible.  (Closes: #1120068, #1102990)
+
+ -- Étienne Mollier <emollier at debian.org>  Tue, 04 Nov 2025 21:39:49 +0100
+
 python-biom-format (2.1.16-1) unstable; urgency=medium
 
   * New upstream version 2.1.16


=====================================
debian/control
=====================================
@@ -7,6 +7,7 @@ Testsuite: autopkgtest-pkg-python
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
                dh-sequence-python3,
+               pybuild-plugin-pyproject,
                help2man,
                bash-completion,
                cython3,
@@ -14,6 +15,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-click,
                python3-h5py,
                python3-numpy,
+               python3-numpy-dev,
                python3-numpydoc,
                python3-pandas,
                python3-setuptools,
@@ -22,11 +24,10 @@ Build-Depends: debhelper-compat (= 13),
                python3-matplotlib,
                python3-pytest <!nocheck>,
                python3-pytest-cov <!nocheck>
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
 Vcs-Browser: https://salsa.debian.org/med-team/python-biom-format
 Vcs-Git: https://salsa.debian.org/med-team/python-biom-format.git
 Homepage: https://biom-format.org/
-Rules-Requires-Root: no
 
 Package: python3-biom-format
 Architecture: any


=====================================
debian/copyright
=====================================
@@ -4,7 +4,7 @@ Upstream-Contact: Daniel McDonald <wasade at gmail.com>
 Source: https://pypi.python.org/pypi/biom-format/
 
 Files: *
-Copyright: © 2010-2024 Greg Caporaso <gregcaporaso at gmail.com>
+Copyright: © 2010-2025 Greg Caporaso <gregcaporaso at gmail.com>
                        Daniel McDonald <wasade at gmail.com>
                        Jose Clemente
                        Jai Ram Rideout
@@ -68,11 +68,6 @@ License: GPL
  PURPOSE.  See the GNU General Public License for more
  details.
  .
- You should have received a copy of the GNU General Public
- License along with this package; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA  02110-1301 USA
- .
  On Debian systems, the full text of the GNU General Public
  License version 2 can be found in the file
  `/usr/share/common-licenses/GPL-2'.


=====================================
debian/patches/fix_future_import.patch
=====================================
@@ -1,5 +1,5 @@
 Author: Andreas Tille <tille at debian.org>
-Last-Update: Fri, 05 Jan 2024 21:52:13 +0100
+Last-Update: 2024-01-05
 Description: future is not needed any more
 
 --- python-biom-format.orig/biom/__init__.py


=====================================
debian/patches/ignore_local_dist-packages.patch
=====================================
@@ -1,5 +1,5 @@
 Author: Tim Booth <tbooth at ceh.ac.uk>
-Last-Update: Fri, 28 Feb 2014 16:25:41 +0000
+Last-Update: 2014-02-28
 Description:  This patch allows biom to work even if there is an older
  installation of the biom libs in /usr/local/...
  Not sure if this is the neatest fix, but absolute_imports doesn't seem to be


=====================================
debian/patches/no-web-adds.patch
=====================================
@@ -1,5 +1,5 @@
 Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 20 May 2014 19:16:23 +0200
+Last-Update: 2014-05-20
 Description: Save user privacy by preventing inclusion of web adds
 
 --- a/doc/_templates/layout.html


=====================================
debian/patches/posix_shell.patch
=====================================
@@ -1,5 +1,5 @@
 Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 06 Aug 2019 08:30:23 +0200
+Last-Update: 2019-08-06
 Description: Fix shell syntax
 
 --- a/biom/assets/exercise_cli.sh


=====================================
debian/patches/sphinx_1.6.patch
=====================================
@@ -1,7 +1,7 @@
 Description: Fix build with sphinx 1.6
 Bug-Debian: https://bugs.debian.org/896629
 Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 24 Apr 2018 17:23:35 +0200
+Last-Update: 2018-04-24
 
 --- a/doc/sphinxext/numpydoc/numpydoc/numpydoc.py
 +++ b/doc/sphinxext/numpydoc/numpydoc/numpydoc.py


=====================================
debian/rules
=====================================
@@ -7,16 +7,15 @@ export LC_ALL=C.UTF-8
 
 export PYBUILD_NAME=biom-format
 export PYBUILD_DESTDIR_python3=debian/python3-$(PYBUILD_NAME)
-export examplepkg=python-$(PYBUILD_NAME)-examples
-export PYBUILD_AFTER_INSTALL_python3=dh_numpy3
 export PYBUILD_BEFORE_TEST=cp -r {dir}/examples {build_dir}
+export PYBUILD_AFTER_TEST=rm -rf {build_dir}/examples
 
 ## When trying better hardening the build fails
 # export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
 %:
-	dh $@ --with bash-completion,sphinxdoc --buildsystem=pybuild
+	dh $@ --with bash-completion,sphinxdoc,numpy3 --buildsystem=pybuild
 
 override_dh_auto_build:
 	# arch


=====================================
debian/watch
=====================================
@@ -1,4 +1,5 @@
-version=4
+Version: 5
 
-opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE at -$1.tar.gz%" \
-  https://github.com/biocore/biom-format/tags .*/@ANY_VERSION@@ARCHIVE_EXT@
+Template: Github
+Owner: biocore
+Project: biom-format


=====================================
doc/conf.py
=====================================
@@ -57,15 +57,15 @@ master_doc = 'index'
 
 # General information about the project.
 project = 'biom-format'
-copyright = '2011-2024 The BIOM Format Development Team'
+copyright = '2011-2025 The BIOM Format Development Team'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The full version, including alpha/beta/rc tags.
-version = "2.1.16"
-release = "2.1.16"
+version = "2.1.17"
+release = "2.1.17"
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.


=====================================
pyproject.toml
=====================================
@@ -1,2 +1,91 @@
 [build-system]
 requires = ["setuptools","wheel", "numpy", "cython"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "biom_format"
+dynamic = ["version"]
+description = "Biological Observation Matrix (BIOM) format"
+requires-python = ">= 3.9"
+readme = "README.md"
+authors = [
+    {name = "Daniel McDonald", email = "damcdonald at ucsd.edu"},
+    {name = "Greg Caporaso"},
+    {name = "Jai Ram Rideout"},
+    {name = "Jose Clemente"},
+    {name = "Jorge Cañardo Alastuey"},
+    {name = "Michael Hall"},
+    {name = "Justin Kuczynski"},
+    {name = "Jesse Stombaugh"},
+    {name = "Doug Wendel"},
+    {name = "Andreas Wilke"},
+    {name = "Susan Huse"},
+    {name = "John Hufnagle"},
+    {name = "Folker Meyer"},
+    {name = "Rob Knight"}
+]
+license = { text = "BSD" }
+classifiers = [
+    "Development Status :: 4 - Beta",
+    "License :: OSI Approved :: BSD License",
+    "Topic :: Scientific/Engineering :: Bio-Informatics",
+    "Topic :: Software Development :: Libraries :: Application Frameworks",
+    "Topic :: Software Development :: Libraries :: Python Modules",
+    "Programming Language :: Python",
+    "Programming Language :: Python :: 3",
+    "Programming Language :: Python :: 3 :: Only",
+    "Programming Language :: Python :: 3.9",
+    "Programming Language :: Python :: 3.10",
+    "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
+    "Programming Language :: Python :: 3.13",
+    "Programming Language :: Python :: Implementation :: CPython",
+    "Operating System :: OS Independent",
+    "Operating System :: POSIX :: Linux",
+    "Operating System :: MacOS :: MacOS X",
+    "Operating System :: Microsoft :: Windows",
+]
+dependencies = [
+    "click",
+    "numpy >= 1.9.2",
+    "scipy >= 1.3.1",
+    "pandas >= 0.20.0",
+    "h5py",
+]
+
+[project.optional-dependencies]
+# Corresponds to the old `extras_require`
+test = [
+    "pytest>=6.2.4",
+    "pytest-cov",
+    "flake8",
+]
+hdf5 = ["h5py >= 2.2.0"]
+anndata = ["anndata"]
+
+[project.urls]
+Homepage = "http://www.biom-format.org"
+
+[project.scripts]
+biom = "biom.cli:cli"
+
+[tool.setuptools.packages.find]
+where = ["."]
+
+[tool.setuptools.dynamic]
+version = {attr = "biom.util.__version__"}
+
+[tool.cibuildwheel]
+test-command = "pytest --pyargs biom.tests"
+test-requires = ["pytest", "numpy"]
+
+# Skip 32-bit builds, PyPy, and musllinux
+skip = ["*-win32", "*-manylinux_i686", "pp*", "*-musllinux*"]
+
+# Python versions to build
+build = "cp39-* cp310-* cp311-* cp312-* cp313-*"
+
+[tool.pytest.ini_options]
+addopts = ["--ignore=biom/assets/exercise_api.py "]
+doctest_optionflags = [ "NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL" ]
+testpaths = ["biom"]


=====================================
pytest.ini deleted
=====================================
@@ -1,4 +0,0 @@
-[pytest]
-addopts = --ignore=biom/assets/exercise_api.py 
-doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL
-testpaths = biom


=====================================
setup.cfg deleted
=====================================
@@ -1,8 +0,0 @@
-[aliases]
-test=pytest
-
-[flake8]
-exclude=biom/tests/long_lines.py
-
-[options]
-python_requires = >=3.6


=====================================
setup.py
=====================================
@@ -8,65 +8,8 @@
 # The full license is in the file COPYING.txt, distributed with this software.
 # ----------------------------------------------------------------------------
 
-import sys
-
-from setuptools import setup, find_packages
+from setuptools import setup
 from setuptools.extension import Extension
-from setuptools.command.test import test as TestCommand
-import numpy as np
-from Cython.Build import cythonize
-
-# Hack to prevent stupid "TypeError: 'NoneType' object is not callable" error
-# in multiprocessing/util.py _exit_function when running `python
-# setup.py test` (see
-# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html),
-# borrowed from https://github.com/getsentry/sentry/blob/master/setup.py
-for m in ('multiprocessing', 'logging'):
-    try:
-        __import__(m)
-    except ImportError:
-        pass
-
-__author__ = "Daniel McDonald"
-__copyright__ = "Copyright 2011-2020, The BIOM Format Development Team"
-__credits__ = ["Greg Caporaso", "Daniel McDonald", "Jose Clemente",
-               "Jai Ram Rideout", "Jorge Cañardo Alastuey", "Michael Hall"]
-__license__ = "BSD"
-__version__ = "2.1.16"
-__maintainer__ = "Daniel McDonald"
-__email__ = "mcdonadt at colorado.edu"
-
-
-# derived from https://docs.pytest.org/en/3.8.0/goodpractices.html
-class PyTest(TestCommand):
-    user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]
-
-    def initialize_options(self):
-        TestCommand.initialize_options(self)
-        self.pytest_args = ""
-
-    def run_tests(self):
-        try:
-            import numpy
-            try:
-                # NumPy 1.14 changed repr output breaking our doctests,
-                # request the legacy 1.13 style
-                numpy.set_printoptions(legacy="1.13")
-            except TypeError:
-                # Old Numpy, output should be fine as it is :)
-                # TypeError: set_printoptions() got an unexpected
-                # keyword argument 'legacy'
-                pass
-        except ImportError:
-            numpy = None
-
-        import shlex
-
-        # import here, cause outside the eggs aren't loaded
-        import pytest
-        errno = pytest.main(shlex.split(self.pytest_args))
-        sys.exit(errno)
-
 
 long_description = """BIOM: Biological Observation Matrix
 http://www.biom-format.org
@@ -79,81 +22,23 @@ Folker Meyer, Rob Knight, J Gregory Caporaso
 GigaScience 2012, 1:7.
 """
 
-classes = """
-    Development Status :: 4 - Beta
-    License :: OSI Approved :: BSD License
-    Topic :: Scientific/Engineering :: Bio-Informatics
-    Topic :: Software Development :: Libraries :: Application Frameworks
-    Topic :: Software Development :: Libraries :: Python Modules
-    Programming Language :: Python
-    Programming Language :: Python :: 3
-    Programming Language :: Python :: 3 :: Only
-    Programming Language :: Python :: 3.6
-    Programming Language :: Python :: 3.7
-    Programming Language :: Python :: 3.8
-    Programming Language :: Python :: 3.9
-    Programming Language :: Python :: 3.10
-    Programming Language :: Python :: 3.11
-    Programming Language :: Python :: 3.12
-    Programming Language :: Python :: Implementation :: CPython
-    Operating System :: OS Independent
-    Operating System :: POSIX :: Linux
-    Operating System :: MacOS :: MacOS X
-    Operating System :: Microsoft :: Windows
-"""
-classifiers = [s.strip() for s in classes.split('\n') if s]
-
-# Dealing with Cython
-ext = '.pyx'
-extensions = [Extension("biom._filter",
-                        ["biom/_filter" + ext],
-                        include_dirs=[np.get_include()]),
-              Extension("biom._transform",
-                        ["biom/_transform" + ext],
-                        include_dirs=[np.get_include()]),
-              Extension("biom._subsample",
-                        ["biom/_subsample" + ext],
-                        include_dirs=[np.get_include()])]
-extensions = cythonize(extensions)
 
-install_requires = [
-    "click",
-    "numpy >= 1.9.2",
-    "scipy >= 1.3.1",
-    'pandas >= 0.20.0',
-    "h5py",
-]
+def get_extensions():
+    import numpy as np
+    from Cython.Build import cythonize
 
-if sys.version_info[0] < 3:
-    raise SystemExit("Python 2.7 is no longer supported")
+    extensions = [
+        Extension("biom._filter",
+                  ["biom/_filter.pyx"],
+                  include_dirs=[np.get_include()]),
+        Extension("biom._transform",
+                  ["biom/_transform.pyx"],
+                  include_dirs=[np.get_include()]),
+        Extension("biom._subsample",
+                  ["biom/_subsample.pyx"],
+                  include_dirs=[np.get_include()]),
+    ]
+    return cythonize(extensions, force=True)
 
 
-setup(name='biom-format',
-      version=__version__,
-      description='Biological Observation Matrix (BIOM) format',
-      long_description=long_description,
-      license=__license__,
-      author=__maintainer__,
-      author_email=__email__,
-      maintainer=__maintainer__,
-      maintainer_email=__email__,
-      url='http://www.biom-format.org',
-      packages=find_packages(),
-      tests_require=[
-          'pytest>=6.2.4',
-          'pytest-cov',
-          'flake8',
-      ],
-      include_package_data=True,
-      ext_modules=extensions,
-      include_dirs=[np.get_include()],
-      install_requires=install_requires,
-      extras_require={'hdf5': ["h5py >= 2.2.0"],
-                      'anndata': ["anndata"],
-                      },
-      classifiers=classifiers,
-      cmdclass={"pytest": PyTest},
-      entry_points='''
-          [console_scripts]
-          biom=biom.cli:cli
-      ''')
+setup(ext_modules=get_extensions())



View it on GitLab: https://salsa.debian.org/med-team/python-biom-format/-/compare/17f964e0c3a1cec2eee15445487db683e0266623...7de36b5e65b7b5ed3365e91bf84d87c6d1330b55

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-biom-format/-/compare/17f964e0c3a1cec2eee15445487db683e0266623...7de36b5e65b7b5ed3365e91bf84d87c6d1330b55
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/20251104/465a19b9/attachment-0001.htm>


More information about the debian-med-commit mailing list