Skip to content

Commit 90d9e46

Browse files
committed
ENH: Pin ITK_USE_SYSTEM_* conda-forge deps to tested ranges
conda-forge packages advance at roughly monthly cadence while ITK's vendored third-party copies advance roughly annually. An unpinned recipe picks up the newest conda-forge version at build time, so an HDF5 2.0 / TBB 2023 / Eigen 3.5 upload silently breaks the next build. Pin each ITK_USE_SYSTEM_*-eligible dep in the build-cache host: block with floor = ITK's vendored version and ceiling = next expected ABI break. Apply matching pins to libitk.run: and libitk-devel.run:; tbb ceiling reflects the oneTBB 2022 stable line pre-dating the 2023 rewrite. Python floor raised to 3.10 to track PEP 719 support status. Also replace the two conda-forge metapackages (zlib, expat) with the concrete libs (libzlib, libexpat). The metapackages emit run_exports for the real lib, which was producing spurious "Overdepending against libzlib/libexpat" warnings in every build.
1 parent 35b7416 commit 90d9e46

1 file changed

Lines changed: 48 additions & 28 deletions

File tree

Utilities/conda-packages/recipe.yaml

Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@ outputs:
3030
then: bash Utilities/conda-packages/build.sh
3131
else: call Utilities\conda-packages\build.bat
3232
requirements:
33+
# Version pin policy: floors match ITK's vendored third-party
34+
# versions (Modules/ThirdParty/*/src/); ceilings stop at the
35+
# next expected ABI / API break (major version). conda-forge
36+
# packages move faster than ITK's vendored copies, so explicit
37+
# ranges are required to keep builds deterministic as upstream
38+
# packages advance. Revisit at each ITK release.
3339
build:
34-
- cmake >=3.16.3
40+
- cmake >=3.22.1,<5
3541
- ninja
3642
- ${{ compiler('c') }}
3743
- ${{ compiler('cxx') }}
38-
- castxml >=0.7.0
44+
- castxml >=0.7.0,<0.8
3945
# castxml 0.7.0 bundles Clang 20, which cannot parse the
4046
# __acquire_capability__ pack-expansion syntax introduced in
4147
# libc++ 22's <mutex>. Pin libc++ to <22 until a castxml release
@@ -45,21 +51,32 @@ outputs:
4551
- if: env.get("ITK_CONDA_USE_CCACHE", default="0") == "1"
4652
then: ccache
4753
- if: build_platform != target_platform
48-
then: python
54+
then: python >=3.10,<3.15
4955
host:
56+
# Use conda-forge's "compat" metapackages expat/zlib (not the
57+
# concrete libexpat/libzlib). The metapackages pull in the
58+
# lib* AND ship the CMake compat integration that find_package
59+
# (ZLIB) and find_package(EXPAT) use; switching to the bare lib*
60+
# was tried and caused CMake to fall back to the host system
61+
# zlib (1.2.11) and break the configure.
5062
- if: unix
5163
then:
52-
- expat
53-
- libpng
54-
- zlib
55-
- fftw
56-
- hdf5
57-
- libjpeg-turbo
58-
- libtiff
59-
- eigen
60-
- double-conversion
61-
- tbb-devel
62-
- python
64+
- expat >=2.5,<3
65+
- libpng >=1.6.43,<1.7
66+
- zlib >=1.2.13,<2
67+
- fftw >=3.3.10,<3.4
68+
- hdf5 >=1.14.5,<2
69+
- libjpeg-turbo >=3.0,<4
70+
- libtiff >=4.6,<5
71+
- eigen >=3.4,<3.5
72+
- double-conversion >=3.3,<4
73+
- tbb-devel >=2022.2.0,<2023
74+
- python >=3.10,<3.15
75+
# numpy headers are required by FindPython3 COMPONENTS NumPy
76+
# during the Python-wrapping configure. Earlier builds picked it
77+
# up transitively; make the dep explicit so a solver change
78+
# cannot drop it.
79+
- numpy
6380
source:
6481
path: ../..
6582

@@ -75,17 +92,20 @@ outputs:
7592
else: call Utilities\conda-packages\libitk_install.bat
7693
requirements:
7794
run:
95+
# Most of these are already carried by run_exports from the
96+
# host pins above, but being explicit keeps the recipe
97+
# self-documenting and independent of feedstock behavior.
7898
- if: unix
7999
then:
80-
- expat
81-
- libpng
82-
- zlib
83-
- fftw
84-
- hdf5
85-
- libjpeg-turbo
86-
- libtiff
87-
- double-conversion
88-
- tbb
100+
- expat >=2.5,<3
101+
- libpng >=1.6.43,<1.7
102+
- zlib >=1.2.13,<2
103+
- fftw >=3.3.10,<3.4
104+
- hdf5 >=1.14.5,<2
105+
- libjpeg-turbo >=3.0,<4
106+
- libtiff >=4.6,<5
107+
- double-conversion >=3.3,<4
108+
- tbb >=2022.2.0,<2023
89109
tests:
90110
- script:
91111
- if: osx
@@ -112,9 +132,9 @@ outputs:
112132
- ${{ pin_subpackage('libitk', exact=True) }}
113133
run:
114134
- ${{ pin_subpackage('libitk', exact=True) }}
115-
- tbb-devel
116-
- cmake
117-
- eigen
135+
- tbb-devel >=2022.2.0,<2023
136+
- cmake >=3.22.1,<5
137+
- eigen >=3.4,<3.5
118138
tests:
119139
- script:
120140
- if: unix
@@ -152,10 +172,10 @@ outputs:
152172
requirements:
153173
host:
154174
- ${{ pin_subpackage('libitk', exact=True) }}
155-
- python >=3.9
175+
- python >=3.10,<3.15
156176
run:
157177
- ${{ pin_subpackage('libitk', exact=True) }}
158-
- python >=3.9
178+
- python >=3.10,<3.15
159179
- numpy
160180
tests:
161181
- python:

0 commit comments

Comments
 (0)