Skip to content

Document and script a complete conda-forge source build (all Fortran solvers) - #137

Open
hubertus65 wants to merge 1 commit into
modelon-community:masterfrom
hubertus65:conda-forge-build
Open

hubertus65 wants to merge 1 commit into
modelon-community:masterfrom
hubertus65:conda-forge-build

Conversation

@hubertus65

Copy link
Copy Markdown

Problem

The conda-forge assimulo 3.8.0 package (np2py311) ships without any of the f2py-wrapped
Fortran solvers
: RodasODE, Dopri5, LSODAR, ODASSL, GLIMDA, Radar5ODE and DASP3ODE
are all missing. setup.py builds them only when numpy.distutils imports (have_nd) and drops
them silently otherwise.

Change (one commit, no source files touched)

A recorded, reproducible way to get a complete build from source inside a conda-forge
environment on Python 3.11, verified 2026-09-17 (330 passed, 5 skipped):

  • build_conda_forge.sh — checks Python < 3.12, numpy.distutils and setuptools < 70;
    builds a SuperLU_MT symlink shim at $CONDA_PREFIX/superlu_mt_home, because setup.py expects
    include/slu_mt_*.h + lib/libsuperlu_mt_OPENMP.a and links -lblas_OPENMP, while
    conda-forge's sundials package ships the same library under include/superlu_mt/ and has no
    libblas_OPENMP; uninstalls any shadowing assimulo; runs setup.py install with
    --sundials-home / --blas-home / --lapack-home / --superlu-home pointing into the env;
    verifies every solver imports; optionally runs pytest.
  • INSTALL-conda-forge.md — the why and how, the required conda-forge packages (the
    setuptools=69.1.0 pin as in PyFMI's Dockerfile; sundials 7.8.0 works with the version
    detection in setup.py), and which build-log messages are harmless (numpy.distutils
    AVX512-KNL probes, f2py "Maybe empty" and sortvarnames noise).

Without --superlu-home the build succeeds but Radau5 lacks __RADAU5_WITH_SUPERLU and 7
sparse-Jacobian tests fail — worth documenting, since the failure is silent at build time.

Review notes

  • Documentation and a script only; no source or thirdparty/ files are changed.
  • This is the stop-gap for Python 3.11; the meson-python build PR is the fix that also works on
    3.12. They are independent and do not conflict.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PyrxGeWuwCmAH9LishMW6p

The conda-forge assimulo 3.8.0 package (np2py311) ships without any of the
f2py-wrapped Fortran solvers: RodasODE, Dopri5, LSODAR, ODASSL, GLIMDA,
Radar5ODE and DASP3ODE are all missing. setup.py only builds them when
numpy.distutils imports (have_nd) and drops them silently otherwise;
numpy.distutils is gone on Python >= 3.12 and broken by setuptools >= 70.

This commit records how to get a complete build from source inside a
conda-forge env on Python 3.11, verified 2026-09-17 (330 passed, 5 skipped):

- build_conda_forge.sh: checks Python < 3.12, numpy.distutils and
  setuptools < 70; builds a SuperLU_MT symlink shim
  ($CONDA_PREFIX/superlu_mt_home) because setup.py expects
  include/slu_mt_*.h + lib/libsuperlu_mt_OPENMP.a and links
  -lblas_OPENMP, while conda-forge's sundials package ships the same
  library under include/superlu_mt/ and has no libblas_OPENMP;
  uninstalls any shadowing assimulo; runs setup.py install with
  --sundials-home/--blas-home/--lapack-home/--superlu-home pointing into
  the env; verifies every solver imports; optionally runs pytest.
- INSTALL-conda-forge.md: the why and how, the required conda-forge
  packages (setuptools=69.1.0 pin as in PyFMI's Dockerfile, sundials
  7.8.0 works with the version detection in setup.py), and which
  build-log messages are harmless (numpy.distutils AVX512-KNL probes,
  f2py "Maybe empty" and sortvarnames noise).

Without --superlu-home the build succeeds but Radau5 lacks
__RADAU5_WITH_SUPERLU and 7 sparse-Jacobian tests fail.

No source or thirdparty/ files are changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@hubertus65
hubertus65 marked this pull request as ready for review September 22, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant