From 69ace46ece34085a0ebabed26adc1def597740fd Mon Sep 17 00:00:00 2001 From: cekees <613654+cekees@users.noreply.github.com> Date: Tue, 24 Nov 2026 02:40:50 -0600 Subject: [PATCH] environments: pin yaml <0.2.6 so a fresh macOS solve can import petsc4py conda-forge yaml 0.2.6 (h602ebc4_0) ships libyaml-0.1.dylib, but petsc4py's PETSc.abi3.so is linked against @rpath/libyaml-0.2.dylib. A fresh macOS env solved from these files gets yaml 0.2.6 and `import petsc4py` fails with 'Library not loaded'. Same fix as the 2.0 line (cekees/proteus#352, merged to dev as 922c4680); there it took the macOS py3.12 leg of #344 from failing at the Smoke test to passing the suite. Measured on 2026-11-23: a dry-run solve of environment-mpich-dev.yml from this branch's base (131cfbf7) resolves yaml 0.2.6. The pin is a range, not an exact version, so the off-lock legs' pin-to-floor rewrite in sdist.yml leaves it alone. Co-Authored-By: Claude Sonnet 5.5 --- environment-dev-up.yml | 4 ++++ environment-mpich-dev.yml | 4 ++++ environment-openmpi-dev.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/environment-dev-up.yml b/environment-dev-up.yml index 7eb4114310..74a0161d98 100644 --- a/environment-dev-up.yml +++ b/environment-dev-up.yml @@ -40,6 +40,10 @@ dependencies: - gmsh >=4.12.2 - matplotlib >=3.9.2 - mpi4py >=4.1.2 + # conda-forge yaml 0.2.6 ships libyaml-0.1.dylib, but petsc4py is built against libyaml-0.2.dylib (yaml >=0.2.5,<0.3): + # on macOS a fresh solve gets 0.2.6 and `import petsc4py` fails with 'Library not loaded: @rpath/libyaml-0.2.dylib'. + # Written as a range so the off-lock legs' pin-to-floor rewrite leaves it alone. + - yaml >=0.2.5,<0.2.6 - pytest >=9.1.1 - pytest-cov >=5.0.0 - pytest-xdist >=3.6.1 diff --git a/environment-mpich-dev.yml b/environment-mpich-dev.yml index 7855517f98..91002f3d7e 100644 --- a/environment-mpich-dev.yml +++ b/environment-mpich-dev.yml @@ -56,6 +56,10 @@ dependencies: - gmsh =4.12.2 - matplotlib =3.9.2 - mpi4py =4.1.2 + # conda-forge yaml 0.2.6 ships libyaml-0.1.dylib, but petsc4py is built against libyaml-0.2.dylib (yaml >=0.2.5,<0.3): + # on macOS a fresh solve gets 0.2.6 and `import petsc4py` fails with 'Library not loaded: @rpath/libyaml-0.2.dylib'. + # Written as a range so the off-lock legs' pin-to-floor rewrite leaves it alone. + - yaml >=0.2.5,<0.2.6 - pytest =9.1.1 - pytest-cov =5.0.0 - pytest-xdist =3.6.1 diff --git a/environment-openmpi-dev.yml b/environment-openmpi-dev.yml index 23400b979d..62cf0d7583 100644 --- a/environment-openmpi-dev.yml +++ b/environment-openmpi-dev.yml @@ -47,6 +47,10 @@ dependencies: - gmsh =4.12.2 - matplotlib =3.9.2 - mpi4py =4.1.2 + # conda-forge yaml 0.2.6 ships libyaml-0.1.dylib, but petsc4py is built against libyaml-0.2.dylib (yaml >=0.2.5,<0.3): + # on macOS a fresh solve gets 0.2.6 and `import petsc4py` fails with 'Library not loaded: @rpath/libyaml-0.2.dylib'. + # Written as a range so the off-lock legs' pin-to-floor rewrite leaves it alone. + - yaml >=0.2.5,<0.2.6 - pytest =9.1.1 - pytest-cov =5.0.0 - pytest-xdist =3.6.1