forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
296 lines (257 loc) · 9.16 KB
/
Copy pathpyproject.toml
File metadata and controls
296 lines (257 loc) · 9.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
[tool.black]
line-length = 88
[tool.pixi.workspace]
name = "ITK"
channels = ["conda-forge"]
platforms = ["linux-64", "linux-aarch64", "win-64", "osx-64", "osx-arm64"]
[tool.pixi.tasks]
clean = { cmd = "git clean -fdx", description = "Clean the repository" }
[tool.pixi.dependencies]
python = ">=3.13.5,<3.14"
[tool.pixi.feature.external-data-upload.dependencies]
boto3 = ">=1.34"
nodejs = ">=20"
requests = ">=2.32"
[tool.pixi.feature.pre-commit.dependencies]
pre-commit = ">=4.1.0,<5"
[tool.pixi.feature.pre-commit.tasks]
pre-commit-install = { cmd = "pre-commit install -f -t pre-commit -t prepare-commit-msg -t commit-msg", description = "Install pre-commit hooks" }
pre-commit-run = { cmd = "pre-commit run --all-files", description = "Run pre-commit hooks on all repository files" }
[tool.pixi.feature.dev.dependencies]
cmake = ">=4.0.3,<5"
cxx-compiler = ">=1.10.0,<2"
ninja = ">=1.13.0,<2"
[tool.pixi.feature.cxx.dependencies]
ccache = ">=4.13.6,<5"
[tool.pixi.feature.python.dependencies]
pytest = ">=8.4.1,<9"
numpy = ">=2.3.4,<3"
libopenblas = ">=0.3.30,<0.4"
libgfortran5 = ">=15.2.0,<16"
swig = ">=4.4.1"
castxml = ">=0.7.0,<0.8"
[tool.pixi.feature.cxx.tasks.configure]
cmd = '''cmake \
-Bbuild \
-S. \
-GNinja \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK"
outputs = ["build/CMakeFiles/"]
[tool.pixi.feature.cxx.tasks.configure-ci]
cmd = '''cmake \
-Bbuild \
-S. \
-GNinja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DITK_USE_CCACHE:BOOL=ON \
-DCMAKE_C_COMPILER_LAUNCHER:STRING=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \
-DModule_AdaptiveDenoising:BOOL=ON \
-DModule_AnisotropicDiffusionLBR:BOOL=ON \
-DModule_BoneEnhancement:BOOL=ON \
-DModule_BoneMorphometry:BOOL=ON \
-DModule_BSplineGradient:BOOL=ON \
-DModule_Cuberille:BOOL=ON \
-DModule_FastBilateral:BOOL=ON \
-DModule_FixedPointInverseDisplacementField:BOOL=ON \
-DModule_Fpfh:BOOL=ON \
-DModule_GenericLabelInterpolator:BOOL=ON \
-DModule_GrowCut:BOOL=ON \
-DModule_HigherOrderAccurateGradient:BOOL=ON \
-DModule_IOFDF:BOOL=ON \
-DModule_IOMeshMZ3:BOOL=ON \
-DModule_IOMeshSTL:BOOL=ON \
-DModule_IOMeshSWC:BOOL=ON \
-DModule_IOTransformDCMTK:BOOL=ON \
-DModule_ITKDCMTK:BOOL=ON \
-DModule_IsotropicWavelets:BOOL=ON \
-DModule_LabelErodeDilate:BOOL=ON \
-DModule_MGHIO:BOOL=ON \
-DModule_MeshNoise:BOOL=ON \
-DModule_MeshToPolyData:BOOL=ON \
-DModule_MinimalPathExtraction:BOOL=ON \
-DModule_Montage:BOOL=ON \
-DModule_MorphologicalContourInterpolation:BOOL=ON \
-DModule_MultipleImageIterator:BOOL=ON \
-DModule_ParabolicMorphology:BOOL=ON \
-DModule_PhaseSymmetry:BOOL=ON \
-DModule_PolarTransform:BOOL=ON \
-DModule_PrincipalComponentsAnalysis:BOOL=ON \
-DModule_RANSAC:BOOL=ON \
-DModule_RLEImage:BOOL=ON \
-DModule_SmoothingRecursiveYvvGaussianFilter:BOOL=ON \
-DModule_SplitComponents:BOOL=ON \
-DModule_Strain:BOOL=ON \
-DModule_StructuralSimilarity:BOOL=ON \
-DModule_SubdivisionQuadEdgeMeshFilter:BOOL=ON \
-DModule_TextureFeatures:BOOL=ON \
-DModule_Thickness3D:BOOL=ON \
-DModule_TotalVariation:BOOL=ON \
-DModule_TwoProjectionRegistration:BOOL=ON \
-DModule_VariationalRegistration:BOOL=ON \
-DITK_COMPUTER_MEMORY_SIZE:STRING=5'''
description = "Configure ITK for CI (with ccache compiler launcher)"
outputs = ["build/CMakeFiles/"]
[tool.pixi.feature.cxx.tasks.build]
cmd = "cmake --build build"
description = "Build ITK"
outputs = ["build/lib/**"]
depends-on = ["configure"]
[tool.pixi.feature.cxx.tasks.test]
cmd = "ctest -j3 --test-dir build"
description = "Test ITK"
depends-on = ["build"]
[tool.pixi.feature.cxx.tasks.build-external-data-ci]
cmd = "cmake --build build --target ITKData"
description = "Fetch ITK ExternalData for CI (fails fast on download errors)"
depends-on = ["configure-ci"]
[tool.pixi.feature.cxx.tasks.build-ci]
cmd = "cmake --build build"
description = "Build ITK for CI"
outputs = ["build/lib/**"]
depends-on = ["configure-ci"]
[tool.pixi.feature.cxx.tasks.test-ci]
cmd = "ctest -j3 --test-dir build --output-on-failure"
description = "Test ITK for CI"
depends-on = ["build-ci"]
[tool.pixi.feature.doxygen.dependencies]
doxygen = ">=1.13,<2"
# \cite resolution shells out to perl and bibtex; explicit \dot commands need graphviz.
# texlive-core (the bibtex provider, ~100 MB but linux-only on conda-forge) resolves
# only in the linux targets; manual macOS/Windows runs need bibtex on PATH from a
# system TeX distribution (MacTeX, MiKTeX).
[tool.pixi.feature.doxygen.target.linux-64.dependencies]
perl = ">=5.32"
texlive-core = ">=20220321"
graphviz = ">=9"
[tool.pixi.feature.doxygen.target.linux-aarch64.dependencies]
perl = ">=5.32"
texlive-core = ">=20220321"
graphviz = ">=9"
[tool.pixi.feature.doxygen.target.osx-64.dependencies]
perl = ">=5.32"
graphviz = ">=9"
[tool.pixi.feature.doxygen.target.osx-arm64.dependencies]
perl = ">=5.32"
graphviz = ">=9"
[tool.pixi.feature.doxygen.target.win-64.dependencies]
perl = ">=5.32"
graphviz = ">=9"
[tool.pixi.feature.doxygen.tasks.configure-doxygen-ci]
cmd = '''cmake \
-Bbuild-doxygen \
-S. \
-GNinja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=OFF \
-DITK_FORBID_DOWNLOADS:BOOL=ON \
-DITK_BUILD_DOCUMENTATION:BOOL=ON \
-DModule_ITKReview:BOOL=ON \
-DModule_MGHIO:BOOL=ON \
-DModule_GenericLabelInterpolator:BOOL=ON \
-DModule_AdaptiveDenoising:BOOL=ON \
-DITK_DOXYGEN_WARNINGS_ONLY:BOOL=ON'''
description = "Configure ITK for the Doxygen warnings check"
[tool.pixi.feature.doxygen.tasks.doxygen-ci]
cmd = "cmake --build build-doxygen --target Documentation"
description = "Warnings-only Doxygen pass; fails on any warning (warning log: build-doxygen/doxygen-warnings.log)"
depends-on = ["configure-doxygen-ci"]
[tool.pixi.feature.cxx.tasks.configure-debug]
cmd = '''cmake \
-Bbuild-debug \
-S. \
-GNinja \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK - Debug"
outputs = ["build-debug/CMakeFiles/"]
[tool.pixi.feature.cxx.tasks.build-debug]
cmd = "cmake --build build-debug"
description = "Build ITK - Debug"
outputs = ["build-debug/lib/**"]
depends-on = ["configure-debug"]
[tool.pixi.feature.cxx.tasks.test-debug]
cmd = "ctest -j3 --test-dir build-debug"
description = "Test ITK - Debug"
depends-on = ["build-debug"]
[tool.pixi.feature.cxx.tasks.configure-release]
cmd = '''cmake \
-Bbuild-release \
-S. \
-GNinja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK - Release"
outputs = ["build-release/CMakeFiles/"]
[tool.pixi.feature.cxx.tasks.build-release]
cmd = "cmake --build build-release"
description = "Build ITK - Release"
outputs = ["build-release/lib/**"]
depends-on = ["configure-release"]
[tool.pixi.feature.cxx.tasks.test-release]
cmd = "ctest -j3 --test-dir build-release"
description = "Test ITK - Release"
depends-on = ["build-release"]
[tool.pixi.feature.python.tasks.configure-python]
cmd = '''cmake \
-Bbuild-python \
-S. \
-GNinja \
-DITK_WRAP_PYTHON:BOOL=ON \
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
-DITK_USE_SYSTEM_CASTXML:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK Python"
outputs = ["build-python/CMakeFiles/"]
[tool.pixi.feature.python.tasks.build-python]
cmd = "cmake --build build-python"
description = "Build ITK Python"
outputs = ["build-python/lib/**"]
depends-on = ["configure-python"]
[tool.pixi.feature.python.tasks.test-python]
cmd = "ctest -j3 --test-dir build-python"
description = "Test ITK Python"
depends-on = ["build-python"]
[tool.pixi.feature.python.tasks.python-exe]
cmd = '''cp ./build-python/Wrapping/Generators/Python/WrapITK.pth $(python -c "import site; print(next(p for p in site.getsitepackages() if \'site-packages\' in p))") &&
python'''
description = "Run a Python executable with the development ITK Python package"
depends-on = ["build-python"]
[tool.pixi.feature.python.tasks.configure-debug-python]
cmd = '''cmake \
-Bbuild-debug-python \
-S. \
-GNinja \
-DITK_WRAP_PYTHON:BOOL=ON \
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
-DITK_USE_SYSTEM_CASTXML:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK Python - Debug"
outputs = ["build-debug-python/CMakeFiles/"]
[tool.pixi.feature.python.tasks.build-debug-python]
cmd = "cmake --build build-debug-python"
description = "Build ITK Python - Debug"
outputs = ["build-debug-python/lib/**"]
depends-on = ["configure-debug-python"]
[tool.pixi.feature.python.tasks.test-debug-python]
cmd = "ctest -j3 --test-dir build-debug-python"
description = "Test ITK Python - Debug"
depends-on = ["build-debug-python"]
[tool.pixi.feature.python.tasks.python-exe-debug]
cmd = '''cp ./build-debug-python/Wrapping/Generators/Python/WrapITK.pth $(python -c "import site; print(next(p for p in site.getsitepackages() if \'site-packages\' in p))") &&
python'''
description = "Run a Python executable with the development ITK Python Debug build package"
depends-on = ["build-debug-python"]
[tool.pixi.environments]
dev = ["dev"]
cxx = ["dev", "cxx"]
python = ["python", "dev"]
pre-commit = ["pre-commit"]
external-data-upload = ["external-data-upload"]
doxygen = ["dev", "doxygen"]