Repository navigation
Expand file tree
/
Copy pathpixi.toml
More file actions
123 lines (101 loc) · 4.05 KB
/
Copy pathpixi.toml
File metadata and controls
123 lines (101 loc) · 4.05 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
[workspace]
authors = ["Ondřej Čertík <ondrej@certik.us>"]
channels = ["conda-forge"]
name = "fplotlib"
platforms = ["osx-arm64", "linux-64"]
version = "0.1.0"
# One environment per compiler, holding nothing but the compiler and fpm, so
# the tests need no Python; the matplotlib comparison has an environment of
# its own, as does the local documentation gallery. Every task is defined
# in exactly one environment, so
# `pixi run test-lfortran` picks the lfortran environment without being told,
# and installs it the first time.
[dependencies]
fpm = ">=0.13.0,<0.14"
[feature.gfortran.dependencies]
gfortran = ">=16,<17"
[feature.gfortran.tasks]
test-gfortran = "fpm test --compiler gfortran"
# -O3 with fused multiply-add allowed: the rounding then differs from the
# plain build, and the pictures must not.
test-gfortran-O3 = "fpm test --compiler gfortran --flag '-O3 -march=native'"
demo-gfortran = "fpm run --example demo --compiler gfortran"
# conda-forge has flang for Linux only; on macOS provide a system flang on
# PATH. The compiler is a feature of its own because the matplotlib
# environment needs it as well, while the tasks belong to the flang
# environment alone.
[feature.flang.target.linux-64.dependencies]
flang_linux-64 = ">=22,<23"
[feature.flang-tasks.tasks]
test-flang = "fpm test --compiler flang"
test-flang-O3 = "fpm test --compiler flang --flag '-O3 -march=native'"
demo-flang = "fpm run --example demo --compiler flang"
# LFortran cannot share an environment with flang: conda-forge builds it
# against clang 21 and flang against clang 22.
[feature.lfortran.dependencies]
lfortran = ">=0.66.0,<0.67"
[feature.lfortran.tasks]
test-lfortran = "fpm test --compiler lfortran"
demo-lfortran = "fpm run --example demo --compiler lfortran"
[feature.matplotlib.dependencies]
python = ">=3.14.6,<3.15"
matplotlib = ">=3.11.1,<4"
numpy = ">=2.5.1,<3"
cairosvg = ">=2.9.0,<3"
pillow = ">=12.3.0,<13"
# pdftoppm, for rasterizing PDFs in tests/compare_pdfs.py
poppler = "*"
# gs, for rasterizing EPS in tests/compare_eps.py
ghostscript = ">=10.4.0,<11"
# The comparisons read the matplotlib references from tests/refs and the
# flang build's pictures from tests/out. Both are made once: the inputs and
# outputs let pixi skip them when nothing they depend on has changed, so the
# five comparisons, run one after another, share one build.
[feature.matplotlib.tasks.mpl-refs]
cmd = "python tests/gen_mpl_refs.py"
inputs = ["tests/gen_mpl_refs.py", "tools/gen_glyphs.py"]
outputs = ["tests/refs/*"]
[feature.matplotlib.tasks.test-outputs]
cmd = "fpm test --compiler flang"
inputs = ["fpm.toml", "src/*.f90", "tests/*.f90", "tests/fingerprints.txt"]
outputs = ["tests/out/*"]
[feature.matplotlib.tasks.compare]
cmd = "python tests/compare_svgs.py"
depends-on = ["mpl-refs", "test-outputs"]
[feature.matplotlib.tasks.compare-png]
cmd = "python tests/compare_pngs.py"
depends-on = ["mpl-refs", "test-outputs"]
[feature.matplotlib.tasks.compare-pdf]
cmd = "python tests/compare_pdfs.py"
depends-on = ["mpl-refs", "test-outputs"]
[feature.matplotlib.tasks.compare-eps]
cmd = "python tests/compare_eps.py"
depends-on = ["mpl-refs", "test-outputs"]
[feature.matplotlib.tasks.compare-gif]
cmd = "python tests/compare_gif.py"
depends-on = ["mpl-refs", "test-outputs"]
[feature.matplotlib.tasks.compare-all]
depends-on = ["compare", "compare-png", "compare-pdf", "compare-eps", "compare-gif"]
[feature.gallery.dependencies]
python = ">=3.12,<3.15"
gfortran = ">=16,<17"
[feature.gallery.pypi-dependencies]
sphinx = "*"
myst-parser = "*"
ford = "*"
pydata-sphinx-theme = "*"
sphinx-fplotlib-gallery = { path = "sphinx-fplotlib-gallery", editable = true }
sphinx-fortran-domain = "*"
sphinx-gallery = "*"
[feature.gallery.tasks.gallery]
cmd = "sphinx-build -W -b html docs docs/_build/html"
env = { FPM_FC = "gfortran" }
[feature.gallery.tasks.gallery-serve]
cmd = "python -m http.server --bind 127.0.0.1 --directory docs/_build/html"
depends-on = ["gallery"]
[environments]
gfortran = ["gfortran"]
flang = ["flang", "flang-tasks"]
lfortran = ["lfortran"]
matplotlib = ["flang", "matplotlib"]
gallery = ["gallery"]