From eb0f772dcbcabdd266049a4edd10c16b7f52d08e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 25 Aug 2026 14:28:10 +0000 Subject: [PATCH] fix(docker): cap Cython below 3.3 so pyOpenMS still builds The image build fails in the compile-openms stage at 'make -j4 pyopenms': File ".../autowrap/PXDParser.py", line 69, in _check_type_constness return isinstance(ctype, Nodes.CConstTypeNode) AttributeError: module 'Cython.Compiler.Nodes' has no attribute 'CConstTypeNode' AttributeError: module 'Cython.Compiler.Nodes' has no attribute 'CConstOrVolatileTypeNode' autowrap is pinned to 0.24, whose constness check reflects on those two Cython nodes, while Cython had no upper bound and now resolves to 3.3.0, which removed the second one as well - so the fallback raises and the pyOpenMS code generation dies. Nothing in the repository changed; the same commit built fine before Cython 3.3 was released. Checked against autowrap 0.24: Cython 3.1.8, 3.2.0 and 3.2.9 all still provide CConstOrVolatileTypeNode and take the fallback path, 3.3.0 does not - hence '<3.3' rather than a tighter cap. Lifting it again needs an autowrap that supports Cython 3.3 (0.27.0 is current), which in turn has to match the OpenMS branch the image builds. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01RAyRJPFo13Xn4w8b4B8ju6 --- Dockerfile | 5 ++++- Dockerfile.arm | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f72d95..292154d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,10 @@ RUN echo "mamba activate streamlit-env" >> ~/.bashrc SHELL ["/bin/bash", "--rcfile", "~/.bashrc"] SHELL ["mamba", "run", "-n", "streamlit-env", "/bin/bash", "-c"] -RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython>=3.1' 'autowrap==0.24' pandas 'numpy>=2.0' pytest +# Cython is capped below 3.3: autowrap 0.24 reflects on +# Nodes.CConstTypeNode / Nodes.CConstOrVolatileTypeNode, which Cython 3.3 +# removed, breaking the pyOpenMS code generation in 'make pyopenms'. +RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython>=3.1,<3.3' 'autowrap==0.24' pandas 'numpy>=2.0' pytest # Clone OpenMS branch and the associcated contrib+thirdparties+pyOpenMS-doc submodules. RUN git clone --recursive --depth=1 -b ${OPENMS_BRANCH} --single-branch ${OPENMS_REPO} && cd /OpenMS diff --git a/Dockerfile.arm b/Dockerfile.arm index 9fe055e..135cbbb 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -59,7 +59,10 @@ RUN echo "mamba activate streamlit-env" >> ~/.bashrc SHELL ["/bin/bash", "--rcfile", "~/.bashrc"] SHELL ["mamba", "run", "-n", "streamlit-env", "/bin/bash", "-c"] -RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython>=3.1' 'autowrap==0.24' pandas 'numpy>=2.0' pytest +# Cython is capped below 3.3: autowrap 0.24 reflects on +# Nodes.CConstTypeNode / Nodes.CConstOrVolatileTypeNode, which Cython 3.3 +# removed, breaking the pyOpenMS code generation in 'make pyopenms'. +RUN pip install --upgrade pip && python -m pip install -U setuptools nose 'Cython>=3.1,<3.3' 'autowrap==0.24' pandas 'numpy>=2.0' pytest # Clone OpenMS branch and the associcated contrib+thirdparties+pyOpenMS-doc submodules. RUN git clone --recursive --depth=1 -b ${OPENMS_BRANCH} --single-branch ${OPENMS_REPO} && cd /OpenMS