From 6d4ec063507c9f336b56b821916e235ca9d637e9 Mon Sep 17 00:00:00 2001 From: Marius Lange Date: Tue, 9 Jun 2026 19:05:15 +0200 Subject: [PATCH 1/2] Delegate gpcca-fast petsc backend to cellrank[petsc]>=2.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cellrank 2.3.1 ships an mpi4py-free [petsc] extra (scverse/cellrank#1362), so the gpcca-fast group can pull petsc4py/slepc4py from cellrank instead of hardcoding them — CellRank now owns that list. slepc is kept explicit as a workaround: slepc4py's published sdist metadata omits its runtime dependency on the `slepc` library package (it is added dynamically at build time), so uv won't install slepc from cellrank[petsc] alone and slepc4py fails to import ("Library not loaded: libslepc"). petsc4py declares `petsc` correctly, so petsc needs no such workaround. Verified: full lock resolves cellrank 2.3.1 + petsc/petsc4py/slepc/ slepc4py with no mpi4py; slepc4py imports only when the explicit slepc is present (confirmed both ways in a throwaway venv). Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 1 + pyproject.toml | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31b4c11..c688098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning][]. ### Changed - Dropped Python 3.11 support; the minimum supported version is now Python 3.12, aligning with `cellrank` (≥2.1 requires Python ≥3.12) and unpinning the `tutorials` extra from the old `cellrank` 2.0.7 {pr}`81` +- The `gpcca-fast` dependency group now delegates `petsc4py`/`slepc4py` to `cellrank[petsc]>=2.3.1` (mpi4py-free) instead of hardcoding them, keeping only an explicit `slepc` to work around slepc4py's missing runtime metadata {pr}`PRNUM` ## [v0.2.5] diff --git a/pyproject.toml b/pyproject.toml index b7ea27e..eb3fff0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,23 +80,31 @@ urls.Documentation = "https://cellmapper.readthedocs.io/" urls.Homepage = "https://github.com/quadbio/cellmapper" urls.Source = "https://github.com/quadbio/cellmapper" -# Opt-in fast backend for pyGPCCA (pulled in by cellrank's tutorials extra). -# Without petsc4py/slepc4py, pyGPCCA falls back to method='brandts', which -# densifies the transition matrix and warns. This is a PEP 735 dependency group -# (NOT an extra) on purpose: petsc/slepc have no wheels and compile from source, -# so we keep them out of `uv sync --all-extras` and require an explicit opt-in. +# Opt-in fast backend for pyGPCCA (used by cellrank). Without petsc4py/slepc4py, +# pyGPCCA falls back to method='brandts', which densifies the transition matrix +# and warns. petsc4py/slepc4py come from cellrank's own `petsc` extra (mpi4py-free +# since cellrank 2.3.1), so CellRank owns those. This is a PEP 735 dependency +# group (NOT an extra) on purpose: petsc/slepc have no wheels and compile from +# source, so we keep them out of `uv sync --all-extras` and require explicit opt-in. +# +# `slepc` is listed explicitly because slepc4py's published sdist metadata omits +# its runtime dep on the `slepc` library package (it's added dynamically at build +# time), so uv won't install slepc from cellrank[petsc] alone and slepc4py then +# fails to import with "Library not loaded: libslepc". (petsc4py declares `petsc` +# correctly, so petsc needs no such workaround.) Drop this once slepc4py — or +# cellrank's petsc extra — declares slepc. # # The build needs a C compiler only (no Fortran/MPI/system libs) IF you pass # PETSC_CONFIGURE_OPTIONS. Do NOT set SLEPC_CONFIGURE_OPTIONS — SLEPc inherits # config from the built PETSc. Install (one-time source build, ~4 min, cached): # PETSC_CONFIGURE_OPTIONS="--with-fc=0 --with-mpi=0 --with-debugging=0 --with-shared-libraries=1" \ # uv sync --all-extras --group gpcca-fast +# NB: a plain `uv sync --all-extras` (without --group gpcca-fast) will UNINSTALL +# petsc/slepc if present — re-include the group on every refresh to keep them. [dependency-groups] gpcca-fast = [ - "petsc", - "petsc4py", - "slepc", - "slepc4py", + "cellrank[petsc]>=2.3.1", + "slepc>=3.25", ] [tool.hatch] From 7c6a5e031c795c9d6fd7e700c2b3d9d5870c91f4 Mon Sep 17 00:00:00 2001 From: Marius Lange Date: Tue, 9 Jun 2026 19:05:45 +0200 Subject: [PATCH 2/2] Fill changelog PR number for #82 Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c688098..07608d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning][]. ### Changed - Dropped Python 3.11 support; the minimum supported version is now Python 3.12, aligning with `cellrank` (≥2.1 requires Python ≥3.12) and unpinning the `tutorials` extra from the old `cellrank` 2.0.7 {pr}`81` -- The `gpcca-fast` dependency group now delegates `petsc4py`/`slepc4py` to `cellrank[petsc]>=2.3.1` (mpi4py-free) instead of hardcoding them, keeping only an explicit `slepc` to work around slepc4py's missing runtime metadata {pr}`PRNUM` +- The `gpcca-fast` dependency group now delegates `petsc4py`/`slepc4py` to `cellrank[petsc]>=2.3.1` (mpi4py-free) instead of hardcoding them, keeping only an explicit `slepc` to work around slepc4py's missing runtime metadata {pr}`82` ## [v0.2.5]