forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
156 lines (130 loc) · 4.5 KB
/
pyproject.toml
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
[tool.black]
line-length = 88
[tool.pixi.project]
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.12.0,<3.13"
[tool.pixi.feature.pre-commit.dependencies]
pre-commit = ">=4.0.1,<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", description = "Run pre-commit hooks on all repository files" }
[tool.pixi.feature.dev.dependencies]
cmake = ">=3.30.2,<4"
cxx-compiler = ">=1.7.0,<2"
ninja = ">=1.12.1,<2"
[tool.pixi.feature.cxx.dependencies]
[tool.pixi.feature.python.dependencies]
pytest = "*"
numpy = ">=2.1.2,<3"
[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.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.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
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK Python"
outputs = ["build/CMakeFiles/"]
[tool.pixi.feature.python.tasks.build-python]
cmd = "cmake --build build-python"
description = "Build ITK Python"
outputs = ["build/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
-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-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"]