-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpixi.toml
457 lines (383 loc) · 15.5 KB
/
pixi.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
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# This file describes the [pixi](https://pixi.sh) interface to e-antic, see the
# README for how to use pixi with e-antic.
[project]
channels = ["conda-forge"]
description = "(Real Embedded) Algebraic Number Theory"
name = "e-antic"
platforms = ["linux-64", "osx-64"]
[environments]
libeantic-flint-26 = ["libeantic", "flint-26"]
libeantic-flint-27 = ["libeantic", "flint-27"]
libeantic-flint-28 = ["libeantic", "flint-28"]
libeantic-flint-29 = ["libeantic", "flint-29"]
libeantic-flint-30 = ["libeantic", "flint-30"]
libeantic-normaliz-integration = ["normaliz-integration", "integration", "libeantic", "flint-30"]
pyeantic-sagemath-92 = ["libeantic", "pyeantic", "sagemath-92"]
pyeantic-sagemath-93 = ["libeantic", "pyeantic", "sagemath-93"]
pyeantic-sagemath-94 = ["libeantic", "pyeantic", "sagemath-94"]
pyeantic-sagemath-95 = ["libeantic", "pyeantic", "sagemath-95"]
pyeantic-sagemath-96 = ["libeantic", "pyeantic", "sagemath-96"]
pyeantic-sagemath-97 = ["libeantic", "pyeantic", "sagemath-97"]
pyeantic-sagemath-98 = ["libeantic", "pyeantic", "sagemath-98"]
pyeantic-sagemath-100 = ["libeantic", "pyeantic", "sagemath-100"]
pyeantic-sagemath-101 = ["libeantic", "pyeantic", "sagemath-101"]
pyeantic-sagemath-102 = ["libeantic", "pyeantic", "sagemath-102"]
pyeantic-sagemath-103 = ["libeantic", "pyeantic", "sagemath-103"]
dev = ["dev", "doc", "libeantic", "pyeantic"]
env-address-sanitizer = ["address-sanitizer", "libeantic", "pyeantic"]
env-undefined-sanitizer = ["undefined-sanitizer", "libeantic", "pyeantic"]
env-coverage = ["coverage", "libeantic", "pyeantic"]
##############
# ACTIVATION #
##############
[activation.env]
MAKEFLAGS = "-j$(nproc)"
CFLAGS = "-g3"
CXXFLAGS = "-g3 -fvisibility=hidden -fvisibility-inlines-hidden"
[feature.address-sanitizer.activation.env]
CFLAGS = "-fsanitize=address -fno-sanitize-recover -fno-omit-frame-pointer"
CXXFLAGS = "-fsanitize=address -fno-sanitize-recover -fno-omit-frame-pointer"
LDFLAGS = "-fsanitize=address"
[feature.undefined-sanitizer.activation.env]
CFLAGS = "-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
CXXFLAGS = "-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
LDFLAGS = "-fsanitize=undefined"
[feature.coverage.activation.env]
CFLAGS = "-coverage -O0 -UNDEBUG"
CXXFLAGS = "-coverage -O0 -UNDEBUG"
#########
# TASKS #
#########
[tasks.bootstrap]
cmd = "./bootstrap"
inputs = ["configure.ac", "{libeantic,pyeantic,doc}/configure.ac", "Makefile.am", "{libeantic,pyeantic,doc}/**/Makefile.am"]
outputs = ["configure", "{libeantic,pyeantic,doc}/configure", "Makefile.in", "{libeantic,pyeantic,doc}/**/*.in"]
[feature.libeantic.tasks.configure-libeantic]
cmd = './configure --prefix="$CONDA_PREFIX"'
cwd = "libeantic"
depends-on = ["bootstrap"]
inputs = ["libeantic/configure", "libeantic/**/*.in"]
[feature.libeantic.target.linux.tasks.configure-libeantic]
cmd = './configure --prefix="$CONDA_PREFIX" --with-version-script'
cwd = "libeantic"
depends-on = ["bootstrap"]
inputs = ["libeantic/configure", "libeantic/**/*.in"]
[feature.libeantic.tasks.build-libeantic]
cmd = "make check TESTS="
cwd = "libeantic"
depends-on = ["configure-libeantic"]
[feature.libeantic.tasks.test-libeantic]
cmd = "make check"
cwd = "libeantic"
depends-on = ["build-libeantic"]
[feature.pyeantic.tasks.test-libeantic-valgrind]
cmd = "make check-valgrind"
cwd = "libeantic"
depends-on = ["build-libeantic"]
[feature.pyeantic.tasks.configure-pyeantic]
cmd = './configure --prefix="$CONDA_PREFIX" --with-sage --with-realalg'
cwd = "pyeantic"
depends-on = ["bootstrap"]
inputs = ["pyeantic/configure", "pyeantic/**/*.in"]
[feature.pyeantic.tasks.build-pyeantic]
cmd = "make"
cwd = "pyeantic"
depends-on = ["configure-pyeantic"]
[feature.pyeantic.tasks.test-pyeantic]
cmd = "make check"
cwd = "pyeantic"
depends-on = ["build-pyeantic", "build-libeantic"]
[feature.pyeantic.tasks.test-pyeantic-valgrind]
cmd = "make check-valgrind"
cwd = "pyeantic"
depends-on = ["build-pyeantic", "build-libeantic"]
[feature.dev.tasks]
codespell = { cmd = "codespell $(git ls-files)" }
# "build" is a shortcut that should (together with its dependencies) run in the "dev" environment.
# To achieve this, we need to split it into two tasks like this (otherwise,
# pixi is going to ask which environment the dependencies should run in.)
build = { cmd = "pixi run dev-build" }
dev-build = { depends-on = ["build-libeantic", "build-pyeantic"] }
# "test" is a shortcut that should (together with its dependencies) run in the "dev" environment.
# To achieve this, we need to split it into two tasks like this (otherwise,
# pixi is going to ask which environment the dependencies should run in.)
test = { cmd = "pixi run dev-test" }
dev-test = { depends-on = ["test-libeantic", "test-pyeantic"] }
# "sage" is a shortcut that should (together with its dependencies) run in the "dev" environment.
# To achieve this, we need to split it into two tasks like this (otherwise,
# pixi is going to ask which environment the dependencies should run in.)
sage = { cmd = "pixi run dev-sage" }
dev-sage = { cmd = "pyeantic-sage" , env = { PATH = "./pyeantic/test/bin/:$PATH"}, depends-on = ["build-libeantic", "build-pyeantic"] }
# "clean" is a shortcut that should (together with its dependencies) run in the "dev" environment.
# To achieve this, we need to split it into two tasks like this (otherwise,
# pixi is going to ask which environment the dependencies should run in.)
clean = { cmd = "pixi run dev-clean" }
dev-clean = { cmd = "make clean", depends-on = ["configure"] }
# "compile-commands" is a shortcut that generates a compile_commands.json that many
# IDEs expect to make sense of C/C++ code.
# This shortcut should run with its dependencies in the "dev" environment.
# To achieve this, we need to split it into two tasks like this (otherwise,
# pixi is going to ask which environment the dependencies should run in.)
compile-commands = { cmd = "pixi run dev-compile-commands" }
dev-compile-commands = { cwd = "libeantic", cmd = "compiledb make -n check TESTS=", depends-on = ["build-libeantic"] }
[feature.dev.tasks.configure]
cmd = './configure --prefix="$CONDA_PREFIX"'
inputs = ["configure", "{libeantic,pyeantic,doc}/configure", "Makefile.in", "{libeantic,pyeantic,doc}/**/*.in"]
outputs = ["Makefile", "{libeantic,pyeantic,doc}/**/Makefile"]
depends-on = ["bootstrap"]
[feature.dev.tasks.distcheck]
cmd = "make distcheck"
depends-on = ["configure"]
[feature.dev.tasks.compiler-warnings-clang]
cmd = """
make clean &&
make check TESTS= CPP=$CPP CC=$CC CXX=$CXX CFLAGS=\"$CFLAGS -UNDEBUG\" CXXFLAGS=\"$CXXFLAGS -UNDEBUG\" &&
make clean &&
make check TESTS= CPP=$CPP CC=$CC CXX=$CXX CFLAGS=\"$CFLAGS -DNDEBUG\" CXXFLAGS=\"$CXXFLAGS -DNDEBUG\"
"""
cwd = "libeantic"
depends-on = "configure-libeantic"
# We need -Wno-reserved-identifiers since we extend FLINT using their style of having internal functions start with an underscore.
# We need -Wno-unsafe-buffer-usage since we need unsafe pointer arithmetic to extend FLINT (efficiently.)
env = { CPP="clang-cpp", CC="clang", CXX="clang++", CFLAGS="-Werror -Weverything -Wno-padded -Wno-disabled-macro-expansion -Wno-float-equal -Wno-documentation -Wno-reserved-identifier -Wno-declaration-after-statement -Wno-unsafe-buffer-usage", CXXFLAGS="-Wno-exit-time-destructors -Wno-undefined-func-template -Wno-global-constructors -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-zero-as-null-pointer-constant -Wno-deprecated-declarations -Wno-shadow-field-in-constructor -Wno-documentation" }
[feature.dev.tasks.compiler-warnings-gcc]
cmd = """
make clean &&
make check TESTS= CPP=$CPP CC=$CC CXX=$CXX CFLAGS=\"$CFLAGS -UNDEBUG\" CXXFLAGS=\"$CXXFLAGS -UNDEBUG\" &&
make clean &&
make check TESTS= CPP=$CPP CC=$CC CXX=$CXX CFLAGS=\"$CFLAGS -DNDEBUG\" CXXFLAGS=\"$CXXFLAGS -DNDEBUG\"
"""
cwd = "libeantic"
depends-on = "configure-libeantic"
# We need -Wno-dangling-reference because our tests rely on GENERATE_REF that does actually create a dangling reference.
env = { CPP="cpp", CC="cc", CXX="c++", CFLAGS="-Werror -Wall -Wextra -pedantic", CXXFLAGS="-Werror -Wall -Wextra -pedantic -Wctor-dtor-privacy -Wold-style-cast -Woverloaded-virtual -Wcast-align -Wcast-qual -Wno-sign-compare -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wno-redundant-decls -Wundef -fdiagnostics-show-option -Wconversion -Wshadow-compatible-local -Wno-deprecated -Wno-deprecated-declarations -Wno-float-equal -Wsign-promo -Wstrict-null-sentinel -Wno-dangling-reference" }
[feature.dev.tasks.configure-libeantic]
cmd = './configure --prefix="$CONDA_PREFIX" --with-byexample --with-benchmark'
cwd = "libeantic"
depends-on = ["bootstrap"]
inputs = ["libeantic/configure", "libeantic/**/*.in"]
[feature.dev.target.linux.tasks.configure-libeantic]
cmd = './configure --prefix="$CONDA_PREFIX" --with-byexample --with-benchmark --with-version-script'
cwd = "libeantic"
depends-on = ["bootstrap"]
inputs = ["libeantic/configure", "libeantic/**/*.in"]
[feature.coverage.tasks.configure-libeantic]
# The gcov build has visibility issues when the version script is enabled.
cmd = './configure --prefix="$CONDA_PREFIX"'
cwd = "libeantic"
depends-on = ["bootstrap"]
inputs = ["libeantic/configure", "libeantic/**/*.in"]
[feature.integration.tasks.install-libeantic]
cmd = "make install"
cwd = "libeantic"
depends-on = ["build-libeantic"]
[feature.normaliz-integration.tasks.check-normaliz]
cmd = """
bash -c '
normaliz=$(mktemp -d)
cleanup() {
rm -rf "$normaliz"
}
trap cleanup EXIT
git clone https://github.com/Normaliz/Normaliz.git "$normaliz"
cd "$normaliz"
autoreconf --install
# Disable e-antic visibility flags that normaliz does not like.
export CXXFLAGS="$CXXFLAGS -fvisibility=default -fno-visibility-inlines-hidden"
chmod +x configure
./configure --prefix="$CONDA_PREFIX" --with-e-antic="$CONDA_PREFIX" --with-nauty="$CONDA_PREFIX" --with-flint="$CONDA_PREFIX" --with-gmp="$CONDA_PREFIX"
make check
'
"""
depends-on = "install-libeantic"
[feature.doc.tasks.configure-doc]
cmd = './configure --prefix="$CONDA_PREFIX"'
cwd = "doc"
depends-on = ["bootstrap"]
inputs = ["doc/configure", "doc/**/*.in"]
[feature.doc.tasks.build-doc]
cmd = "make"
cwd = "doc"
depends-on = ["configure-doc", "build-libeantic", "build-pyeantic"]
[feature.doc.tasks.doc]
cmd = "pixi run dev-doc"
[feature.doc.tasks.dev-doc]
cmd = """
sh -c '
python -m http.server $PORT --bind localhost --directory manual/generated/html &
SERVER_PID=$!
trap "kill $SERVER_PID" EXIT
sleep 1
echo "Preview the documentation at http://localhost:$PORT/"
echo "Press Ctrl-C to continue"
wait $SERVER_PID
'
"""
cwd = "doc"
depends-on = ["build-doc"]
env = { PORT = "8880" }
[feature.doc.tasks.test-doc-linkchecker]
cmd = """
sh -c '
python -m http.server $PORT --bind localhost --directory manual/generated/html &
SERVER_PID=$!
trap "kill $SERVER_PID" EXIT
sleep 1
# Ignore broken links on gmplib.org, they seem to be rate limiting GitHub.
linkchecker --check-extern http://localhost:$PORT/ --no-warnings --ignore gmplib.org
'
"""
cwd = "doc"
depends-on = ["build-doc"]
env = { PORT = "8880" }
################
# DEPENDENCIES #
################
[dependencies]
automake = "*"
make = "*"
libtool = "*"
coreutils = "*"
[feature.libeantic.dependencies]
c-compiler = "*"
cxx-compiler = "*"
gmp = "*"
libflint = "*"
boost-cpp = "*"
[feature.pyeantic.dependencies]
python = "*"
cppyy = "*"
cppyythonizations = "*"
pytest = "*"
setuptools = "*"
sagelib = "*"
# Some extra dependencies that are needed by SageMath doctesting here.
gmpxxyy = "*"
ipywidgets = "*"
realalg = "*"
[feature.pyeantic.pypi-dependencies]
pyeantic = { path = "pyeantic/src", editable = true }
[feature.dev.dependencies]
libflint = "3.*"
benchmark = "*"
byexample = "*"
py = "*"
sagelib = "10.3"
codespell = "*"
clangdev = "*"
compiledb = "*"
[feature.dev.target.linux.dependencies]
# A recent functioning valgrind is only available on conda-forge linux builds.
valgrind = "*"
[feature.address-sanitizer.target.linux.dependencies]
# Work around https://github.com/actions/runner-images/issues/9491
gcc = ">=14.2"
gxx = ">=14.2"
[feature.undefined-sanitizer.target.linux.dependencies]
# Work around https://github.com/actions/runner-images/issues/9491
gcc = ">=14.2"
gxx = ">=14.2"
[feature.doc.dependencies]
sphinx = "7.*"
sphinx-book-theme = "*"
# Work around https://github.com/executablebooks/sphinx-book-theme/issues/865
pydata-sphinx-theme= "<0.16"
linkchecker = "*"
breathe = ">=4.35.0"
doxygen = "*"
[feature.flint-26.dependencies]
libflint = "2.6.*"
antic = "*"
arb = "*"
[feature.flint-27.dependencies]
libflint = "2.7.*"
antic = "*"
arb = "*"
[feature.flint-28.dependencies]
libflint = "2.8.*"
antic = "*"
arb = "*"
[feature.flint-29.dependencies]
libflint = "2.9.*"
antic = "*"
arb = "*"
[feature.flint-30.dependencies]
libflint = "3.0.*"
[feature.sagemath-92.dependencies]
# SageMath 9.2 shipped with Python 3.8 so we make sure that these compatible versions are installed.
python = "3.8.*"
sagelib = "9.2"
# SageMath 9.2 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
# SageMath 9.2 does not come with pip which is needed for feature detection
pip = "*"
[feature.sagemath-93.dependencies]
# SageMath 9.3 shipped with Python 3.9 so we make sure that these compatible versions are installed.
python = "3.9.*"
sagelib = "9.3"
# SageMath 9.3 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-94.dependencies]
# SageMath 9.4 shipped with Python 3.9 so we make sure that these compatible versions are installed.
python = "3.9.*"
sagelib = "9.4"
# SageMath 9.4 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-95.dependencies]
# SageMath 9.5 shipped with Python 3.9 so we make sure that these compatible versions are installed.
python = "3.9.*"
sagelib = "9.5"
# SageMath 9.5 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-96.dependencies]
# SageMath 9.6 shipped with Python 3.10 so we make sure that these compatible versions are installed.
python = "3.10.*"
sagelib = "9.6"
# SageMath 9.6 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-97.dependencies]
# SageMath 9.7 shipped with Python 3.10 so we make sure that these compatible versions are installed.
python = "3.10.*"
sagelib = "9.7"
# SageMath 9.7 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-98.dependencies]
# SageMath 9.8 shipped with Python 3.11 so we make sure that these compatible versions are installed.
python = "3.11.*"
sagelib = "9.8"
# SageMath 9.8 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-100.dependencies]
# SageMath 10.0 shipped with Python 3.11 so we make sure that these compatible versions are installed.
python = "3.11.*"
sagelib = "10.0"
# SageMath 10.0 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-101.dependencies]
# SageMath 10.1 shipped with Python 3.11 so we make sure that these compatible versions are installed.
python = "3.11.*"
sagelib = "10.1"
# SageMath 10.1 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-102.dependencies]
# SageMath 10.2 shipped with Python 3.11 so we make sure that these compatible versions are installed.
python = "3.11.*"
sagelib = "10.2"
# SageMath 10.2 used a FLINT <3 so we need to add our dependencies arb and ANTIC
arb = "*"
antic = "*"
[feature.sagemath-103.dependencies]
# SageMath 10.3 shipped with Python 3.11 so we make sure that these compatible versions are installed.
python = "3.11.*"
sagelib = "10.3"
[feature.normaliz-integration.dependencies]
nauty = "*"