-
Notifications
You must be signed in to change notification settings - Fork 493
Expand file tree
/
Copy pathpixi.toml
More file actions
436 lines (385 loc) · 17.7 KB
/
pixi.toml
File metadata and controls
436 lines (385 loc) · 17.7 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
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
[workspace]
authors = [
"Wolf Vollprecht <wolf@prefix.dev>",
"Bas Zalmstra <bas@prefix.dev>",
"Tim de Jager <tim@prefix.dev>",
"Ruben Arts <ruben@prefix.dev>",
"Nichita Morcotilo <nichita@prefix.dev>",
"Julian Hofer <julian@prefix.dev>",
]
channels = ["https://prefix.dev/conda-forge"]
description = "Package management made easy!"
exclude-newer = "7d"
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64", "linux-aarch64"]
preview = ["pixi-build"]
requires-pixi = ">=0.67"
[workspace.target.linux-64.build-variants]
c_stdlib_version = ["2.17"]
[workspace.target.osx.build-variants]
c_compiler_version = ["19"]
#
# Shared feature for C/C++ compilers and build tools
#
# Use cmake to build aws-lc-sys, because conda's CFLAGS inject -O2 which
# overrides the -O0 required by jitterentropy-base.c, causing a build failure.
[feature.compilers.activation.env]
AWS_LC_SYS_CMAKE_BUILDER = "1"
[feature.compilers.dependencies]
c-compiler = ">=1.11.0,<2"
cmake = ">=3,<4"
cxx-compiler = ">=1.11.0,<2"
openssl = ">=3.5.4,<4"
pkg-config = ">=0.29.2,<0.30"
[feature.compilers.target.linux.dependencies]
c-compiler = ">=1.6.0"
clang = ">=21.1.2,<22"
cxx-compiler = ">=1.6.0"
make = ">=4.4.1,<5"
mold = ">=2.40.2,<3"
#
# Shared feature for Python
#
[feature.python.dependencies]
python = ">=3.13,<3.14"
#
# Shared feature for Rust toolchain
#
[feature.rust.activation]
env.CARGO_TARGET_DIR = "target/pixi"
[feature.rust.dependencies]
rust = ">=1.90.0,<1.91"
rust-src = ">=1.90.0,<2"
[feature.rust.target.unix.activation]
scripts = ["scripts/activate.sh"]
#
# Feature for building and releasing pixi-build-backends
#
[feature.backends-release.activation.env]
RUSTC_WRAPPER = "sccache"
[feature.backends-release.dependencies]
gh = ">=2,<3"
questionary = ">=2.1,<3"
rattler-build = ">=0.61.4,<0.62"
rich = ">=14,<15"
"ruamel.yaml" = ">=0.18,<0.19"
sccache = ">=0.13.0,<0.14"
tomlkit = ">=0.13,<0.14"
[feature.backends-release.tasks]
generate-versions = { cmd = "python pixi-build-backends/scripts/generate-versions.py", description = "Generate version env vars for CI" }
release-backends = { cmd = "python scripts/release_backends.py", description = "Bump backend versions, create tags, and push" }
[feature.backends-release.tasks.upload-packages]
args = ["packages_dir"]
cmd = "python pixi-build-backends/scripts/upload-packages.py {{ packages_dir }}"
description = "Upload conda packages to prefix.dev with attestation"
[feature.backends-release.tasks.build-backend-packages]
args = ["target_platform"]
cmd = """
rm -rf output/bld/ && \
rattler-build build \
--experimental \
--no-build-id \
--test native \
--channel-priority disabled \
--channel https://prefix.dev/conda-forge \
--variant-config pixi-build-backends/recipe/variants.yaml \
--recipe pixi-build-backends/recipe/all-backends/recipe.yaml \
--target-platform {{ target_platform }}
"""
description = "Build a backend packages"
#
# Feature for development tools and utilities
#
[feature.dev.dependencies]
cargo-edit = ">=0.13.7,<0.14"
cargo-nextest = ">=0.9.105,<0.10"
[feature.dev.tasks]
insta-review = { cmd = "cargo insta review --workspace", description = "Review cargo-insta snapshots" }
pypi-proxy = { cmd = "python scripts/pypi-proxy.py", description = "Run PyPI proxy server" }
switch-to-remote-rattler = { cmd = "python scripts/local_patch.py rattler remote", description = "Switch back to remote rattler dependencies" }
switch-to-remote-uv = { cmd = "python scripts/local_patch.py uv remote", description = "Switch back to remote uv dependencies" }
update-rattler = { cmd = "cargo upgrade --incompatible allow -p rattler -p file_url -p rattler_cache -p rattler_conda_types -p rattler_digest -p rattler_lock -p rattler_networking -p rattler_repodata_gateway -p rattler_shell -p rattler_solve -p rattler_virtual_packages", description = "Update rattler dependencies to latest versions" }
[feature.dev.tasks.snapshot-update]
args = [{ "arg" = "expression", "default" = "" }]
cmd = "pytest --inline-snapshot=fix -k '{{ expression }}'"
description = "Update inline snapshots for tests matching expression"
[feature.dev.tasks.switch-to-local-rattler]
args = [{ arg = "rattler_path", default = "../rattler" }]
cmd = "python scripts/local_patch.py rattler local {{ rattler_path }}"
description = "Switch to local rattler development dependencies"
[feature.dev.tasks.switch-to-local-uv]
args = [{ arg = "uv_path", default = "../uv" }]
cmd = "python scripts/local_patch.py uv local {{ uv_path }}"
description = "Switch to local uv development dependencies"
#
# Feature for cross-compilation with zig
#
[feature.dist.dependencies]
zig = ">=0.15.1,<0.16"
#
# Feature for documentation building and deployment
#
[feature.docs.dependencies]
cairosvg = ">=2.8.2,<3"
click = "==8.2.1" # see https://github.com/mkdocs/mkdocs/issues/4032
mdx_truly_sane_lists = ">=1.3,<2"
mike = ">=2.1.3,<3"
mkdocs-llmstxt = ">=0.4.0,<0.5"
mkdocs-material = ">=9.6.21,<10"
mkdocs-redirects = ">=1.2.1,<2"
nushell = ">=0.109.1,<0.110"
pillow = ">=12,<13"
[feature.docs.tasks]
build-docs = { cmd = "mkdocs build --strict", depends-on = [
"download-font",
], description = "Build documentation" }
deploy-dev = { cmd = "mike deploy --push dev devel", description = "Deploy development docs" }
deploy-latest = { cmd = "mike deploy --push --update-aliases $RELEASE_VERSION latest", description = "Deploy latest release docs" }
docs = { cmd = "mkdocs serve", depends-on = [
"download-font",
], description = "Serve the docs locally" }
download-font = { cmd = "nu docs/layouts/download-font-to-cache.nu", description = "Download fonts for documentation" }
generate-cli-docs = { cmd = "cargo run --locked --manifest-path crates/pixi_docs/Cargo.toml", description = "Generate CLI documentation" }
mike-serve = { cmd = "mike serve", description = "Serve versioned docs with mike" }
#
# Feature for linting and formatting tools
#
[feature.lint.dependencies]
actionlint = ">=1.7.7,<2"
basedpyright = ">=1.31.6,<2"
cargo-deny = ">=0.19,<0.19.1" # 0.18.5 breaks license checking for uv crates
cargo-shear = ">=1.7.1,<2"
dprint = ">=0.49.1,<0.51"
go-shfmt = ">=3.12.0,<4"
ruff = ">=0.14.0,<0.15"
shellcheck = ">=0.10.0,<0.11"
taplo = ">=0.10.0,<0.11"
typos = ">=1.38.1,<2"
zizmor = ">=1.18.0,<2"
[feature.lint.tasks]
actionlint = { cmd = "actionlint", env = { SHELLCHECK_OPTS = "-e SC2086" }, description = "Lint GitHub Actions workflows" }
cargo-clippy = { cmd = "cargo clippy --all-targets --workspace -- -D warnings", description = "Run clippy on all targets" }
cargo-deny = { cmd = "cargo deny --workspace check license --deny warnings", description = "Check cargo dependencies licenses" }
cargo-fmt = { cmd = "cargo fmt --all", description = "Format Rust code" }
cargo-shear = { cmd = "cargo shear --fix", description = "Remove unused dependencies" }
check-openssl = { cmd = "python tests/scripts/check-openssl.py", description = "Check OpenSSL configuration" }
dprint-check = { cmd = "dprint check --log-level=silent", description = "Check formatting with dprint" }
dprint-fmt = { cmd = "dprint fmt --incremental=false", description = "Format with dprint" }
ruff-fmt = { cmd = "ruff format --exit-non-zero-on-format --force-exclude", description = "Format Python code with ruff" }
ruff-lint = { cmd = "ruff check --fix --exit-non-zero-on-fix --force-exclude", description = "Lint Python code with ruff" }
shell-fmt = { cmd = "shfmt --write --indent=4 --simplify --binary-next-line", description = "Format shell scripts" }
toml-fmt = { cmd = "taplo fmt", env = { RUST_LOG = "warn" }, description = "Format TOML files" }
toml-lint = { cmd = "taplo lint --verbose **/pixi.toml", description = "Lint TOML files" }
typecheck-python = { cmd = "basedpyright", description = "Type check Python code" }
typos = { cmd = "typos --force-exclude", description = "Check for typos" }
zizmor = { cmd = "zizmor .github/ --min-severity=medium", description = "Security audit GitHub Actions" }
#
# Feature for release tasks
#
[feature.release.dependencies]
cffconvert = ">=2.0.0,<3"
git-cliff = ">=2.12.0,<3"
tbump = ">=6.9.0,<7"
[feature.release.tasks]
bump = { cmd = "tbump --only-patch $RELEASE_VERSION", description = "Bump the version using tbump" }
bump-changelog = { cmd = "git-cliff --unreleased --prepend CHANGELOG.md --github-token $(gh auth token) --tag $RELEASE_VERSION", description = "Update changelog with unreleased changes" }
release = { cmd = "python scripts/release.py", description = "Run the release script" }
#
# Feature for Python integration tests with pytest
#
[feature.pytest.tasks]
pypi-gen-indexes = { cmd = "python tests/data/pypi-indexes/generate-indexes.py", description = "Generate PyPI test indexes" }
test-common-wheels = { cmd = "pytest -s --numprocesses=logical tests/wheel_tests/", depends-on = [
"build-release",
], description = "Run common wheel tests" }
# CI tests add --showlocals, and -vv for better visibility in CI logs
test-common-wheels-ci = { cmd = "pytest --numprocesses=logical --dist loadgroup --showlocals -vv --verbose tests/wheel_tests/", description = "Run common wheel tests in CI" }
test-integration-ci = { cmd = "pytest --numprocesses=logical --dist loadgroup --showlocals -vv --verbose -m '{{ markers }}'", args = [{ arg = "markers", default = "not extra_slow" }], description = "Run integration tests in CI" }
test-integration-extra-slow = { cmd = "pytest --numprocesses=logical", depends-on = [
"build-workspace-release",
], description = "Run all integration tests including extra slow" }
test-integration-extra-slow-ci = { cmd = "pytest --numprocesses=logical --dist loadgroup --showlocals -vv", description = "Run all integration tests in CI" }
test-integration-fast = { cmd = "pytest --pixi-build=debug --numprocesses=logical -m 'not slow and not extra_slow'", depends-on = [
"build-workspace-debug",
], description = "Run fast integration tests with debug build" }
test-integration-slow = { cmd = "pytest --numprocesses=logical --dist loadgroup -m 'not extra_slow'", depends-on = [
"build-workspace-release",
], description = "Run integration tests excluding extra slow" }
test-pixi-build = { cmd = "pytest --numprocesses=logical --timeout=300 tests/integration_python/pixi_build/", depends-on = [
"build-workspace-release",
], description = "Run pixi-build integration tests" }
test-pixi-build-debug = { cmd = "pytest --pixi-build=debug --numprocesses=logical --timeout=300 tests/integration_python/pixi_build/", depends-on = [
"build-workspace-debug",
], description = "Run pixi-build integration tests with debug build" }
[feature.pytest.tasks.test-specific-test]
args = ["test_substring"]
cmd = "pytest -k '{{ test_substring }}'"
depends-on = ["build-workspace-release"]
description = "Run specific test by substring match (e.g. test_substring or path/to/test.py::test_function)"
[feature.pytest.tasks.test-specific-test-debug]
args = ["test_substring"]
cmd = "pytest --pixi-build=debug -k '{{ test_substring }}'"
depends-on = ["build-workspace-debug"]
description = "Run specific test by substring match with debug build"
[feature.pytest.tasks.update-test-channel]
args = ["channel"]
cmd = "python update-channels.py {{ channel }}"
cwd = "tests/data/channels"
description = "Update one test channel by passing a value from mappings.toml (e.g. multiple_versions_channel_1)"
#
# Feature for Python test dependencies
#
[feature.python-test-deps.dependencies]
dirty-equals = ">=0.11,<0.12"
filelock = ">=3.19.1,<4"
git = ">=2.51.0,<3"
inline-snapshot = ">=0.31.1,<0.32"
py-rattler = ">=0.20,<0.21"
pytest = ">=9.0.2,<10"
pytest-rerunfailures = ">=16.0.1,<17"
pytest-timeout = ">=2.4.0,<3"
pytest-xdist = ">=3.8.0,<4"
pyyaml = ">=6.0.3,<7"
rattler-build = ">=0.61.4,<0.62"
rich = ">=14.1.0,<15"
tomli-w = ">=1.2.0,<2"
types-pyyaml = ">=6.0.12.20250915,<7"
# Dependencies to generate the pypi test indexes
hatchling = ">=1.27.0,<2"
python-build = ">=1.3.0,<2"
#
# Feature for building rattler-build recipes
#
[feature.recipes.dependencies]
rattler-build = ">=0.61.4,<0.62"
[feature.recipes.tasks]
build-backends = { cmd = "rattler-build build --recipe-dir empty --output-dir .", cwd = "tests/build-backends", description = "Build build-backends used for testing purposes" }
#
# Feature for Rust building and compilation tasks
#
[feature.rust-build.dependencies]
git = ">=2.51.0,<3"
[feature.rust-build.tasks]
build-debug = { cmd = "cargo build", description = "Build pixi in debug mode" }
build-release = { cmd = "cargo build --release", description = "Build pixi in release mode" }
build-workspace-debug = { cmd = "cargo build --workspace", description = "Build all workspace members in debug mode" }
build-workspace-release = { cmd = "cargo build --workspace --release", description = "Build all workspace members in release mode" }
install = { cmd = "cargo install --path crates/pixi --locked", description = "Install pixi itself locally using cargo" }
install-as = { cmd = "python scripts/install.py", depends-on = [
"build-release",
], description = "Install release build to a custom location" }
install-debug-as = { cmd = "python scripts/install.py --debug", depends-on = [
"build-debug",
], description = "Install debug build to a custom location" }
run-all-examples = { cmd = "python tests/scripts/run-all-examples.py --pixi-exec $CARGO_TARGET_DIR/release/pixi", depends-on = [
"build-release",
], description = "Run all example projects" }
#
# Feature for Rust testing with cargo-nextest and cargo-insta
#
[feature.rust-test.dependencies]
cargo-insta = "*"
[feature.rust-test.tasks]
insta = { cmd = "cargo insta", description = "Run cargo-insta commands" }
test-fast = { cmd = """RUST_LOG="debug,resolvo=info" cargo nextest run --workspace --all-targets""", description = "Run fast Rust tests" }
test-slow = { cmd = """RUST_LOG="debug,resolvo=info" cargo nextest run --workspace --all-targets --features slow_integration_tests,online_tests --status-level skip --failure-output immediate-final --no-fail-fast --final-status-level slow""", description = "Run slow Rust tests with integration and online features" }
#
# Feature for JSON schema generation and testing
#
[feature.schema.dependencies]
jsonschema = ">=4.26.0,<5"
jsonschema-rs = ">=0.45,<1"
pydantic = ">=2.12.5,<3"
pytest = ">=9.0.2,<10"
pytest-timeout = ">=2.4.0,<3"
python-fastjsonschema = ">=2.21.2,<3"
pyyaml = ">=6.0.3,<7"
[feature.schema.tasks]
generate-schema = { cmd = "python model.py", cwd = "schema", description = "Generate JSON schema from model" }
test-schema = { cmd = "pytest -s", depends-on = "generate-schema", cwd = "schema", description = "Test the manifest JSON schema" }
#
# Feature for test wrapper/aggregator tasks
#
[feature.test.tasks]
test = { depends-on = ["test-all-fast"], description = "Run all fast tests" }
test-all-extra-slow = { depends-on = [
"test-slow",
"test-integration-extra-slow",
], description = "Run all tests including extra slow" }
test-all-fast = { depends-on = [
"test-fast",
"test-integration-fast",
], description = "Run all fast Rust and Python tests" }
test-all-slow = { depends-on = [
"test-slow",
"test-integration-slow",
], description = "Run all slow tests" }
#
# Feature for building trampolines
#
[feature.trampoline.dependencies]
zstd = ">=1.5.7,<2"
[feature.trampoline.tasks]
build-trampoline = { cmd = "python trampoline/build-trampoline.py", description = "Build the trampolines" }
compress-trampoline = { cmd = "python trampoline/compress-trampoline.py", description = "Compress the trampolines" }
#
# Feature for running lefthook (lint orchestration)
#
[feature.lefthook.dependencies]
lefthook = ">=2.0.11,<3"
[feature.lefthook.tasks]
lefthook = { cmd = "lefthook", description = "Run lefthook" }
lint = { depends-on = [
"lint-fast",
"lint-slow",
], description = "Run all linters and formatters on all code" }
lint-fast = { cmd = "lefthook run pre-commit --all-files --force", description = "Run all fast linters and formatters (no clippy)" }
lint-slow = { cmd = "lefthook run pre-push --all-files --force", description = "Run all slow linters and formatters" }
pre-commit-install = { cmd = "lefthook install", description = "Install all git hooks" }
pre-commit-install-minimal = { cmd = "lefthook install pre-commit", description = "Install only pre-commit hook" }
#
# Environment definitions
#
[environments]
backends-release = { features = ["backends-release", "python"], solve-group = "python" }
default = { features = [
"rust",
"compilers",
"python",
"python-test-deps",
"dev",
"lint",
"schema",
], solve-group = "python" }
dist = { features = ["dist"] }
# TODO: get rid of rust in the docs env, figure out what to do with the docs generation code.
docs = { features = ["rust", "compilers", "python", "docs"], solve-group = "python" }
python-test = { features = ["pytest", "python-test-deps", "python"], solve-group = "python" }
# TODO: Could this be mixed with the backend-release env?
recipes = { features = ["recipes"] }
release = { features = ["release"] }
# TODO: Can rust-build and rust-test be merged?
rust-build = { features = ["rust", "compilers", "python", "rust-build"], solve-group = "python" }
rust-test = { features = ["rust", "compilers", "python", "dev", "rust-test"], solve-group = "python" }
schema = { features = ["schema"], solve-group = "python" }
test = { features = ["test"], solve-group = "python" }
# TODO: figure out why this is not in a rust-build env.
trampoline = { features = ["trampoline", "python"], solve-group = "python" }
# Required as it runs pixi tasks itself, so we don't want it to have a dependencies on itself.
lefthook = { features = ["lefthook"] }
#
# Package definitions
#
[package]
name = "pixi"
[package.build]
backend = { name = "pixi-build-rust", version = "*" }
source = { path = "crates/pixi" }
# Use cmake to build aws-lc-sys, because conda's CFLAGS inject -O2 which
# overrides the -O0 required by jitterentropy-base.c, causing a build failure.
[package.build.config]
env = { AWS_LC_SYS_CMAKE_BUILDER = "1" }
[package.target.unix.build-dependencies]
clang = "*"
cmake = ">=3,<4"
[package.target.linux.build-dependencies]
make = ">=4,<5"