-
Notifications
You must be signed in to change notification settings - Fork 575
Expand file tree
/
Copy pathpixi.toml
More file actions
679 lines (627 loc) · 19 KB
/
Copy pathpixi.toml
File metadata and controls
679 lines (627 loc) · 19 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
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
[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.74"
[workspace.build-variants]
rust_compiler_version = [">=1.98,<1.99"]
[workspace.target.linux-64.build-variants]
c_stdlib_version = ["2.17"]
[workspace.target.osx.build-variants]
c_compiler_version = ["19"]
[workspace.target.win.build-variants]
c_compiler = ["vs"]
c_compiler_version = ["2026"]
[exclude-newer]
tombi = "0d"
rust_osx-arm64 = "0d"
rust_osx-64 = "0d"
rust_win-64 = "0d"
rust_linux-64 = "0d"
rust_linux-aarch64 = "0d"
#
# Shared feature that exposes the build dependencies of the pixi package,
# including compilers, in the environment.
#
[feature.compilers.dev]
pixi = { path = "." }
#
# Shared feature for Python
#
[feature.python.dependencies]
python = ">=3.14.7,<3.15"
#
# Shared feature for Rust toolchain
#
[feature.rust.dependencies]
rust-src = ">=1.98,<1.99"
# The target dir is anchored to the workspace root so that cargo invocations
# from subdirectories don't create stray target folders at the invocation site.
[feature.rust.target.unix.activation]
env.CARGO_TARGET_DIR = "$PIXI_PROJECT_ROOT/target/pixi"
scripts = ["scripts/activate.sh"]
[feature.rust.target.win.activation]
env.CARGO_TARGET_DIR = "%PIXI_PROJECT_ROOT%\\target\\pixi"
#
# Python packages imported by scripts/release_backends.py. Kept in their own
# feature so the type checker can resolve them without pulling in the build
# tooling from the backends-release environment.
#
[feature.backends-release-deps.dependencies]
py-rattler = ">=0.25.0,<0.26"
questionary = ">=2.1.1,<3"
rich = ">=15.0.0,<16"
"ruamel.yaml" = ">=0.19.1,<0.20"
tomlkit = ">=0.15.1,<0.16"
#
# Feature for development tools and utilities
#
[feature.dev.dependencies]
cargo-edit = ">=0.13.13,<0.14"
cargo-nextest = ">=0.9.146,<0.10"
git-lfs = ">=3.8.0,<4"
[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",
}
snapshot-update = {
args = [{ arg = "expression", default = "" }],
cmd = "pytest --inline-snapshot=fix -k '{{ expression }}'",
depends-on = ["build-workspace-release"],
description = "Update inline snapshots for tests matching expression",
}
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",
}
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",
}
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 for Python test dependencies
#
[feature.python-test-deps.dependencies]
dirty-equals = ">=0.11,<0.12"
filelock = ">=4.0.1,<5"
git = ">=2.55.0,<3"
inline-snapshot = ">=0.35.4,<0.36"
py-rattler = ">=0.25.0,<0.26"
pytest = ">=9.1.1,<10"
pytest-rerunfailures = ">=16.6.1,<17"
pytest-timeout = ">=2.4.0,<3"
pytest-xdist = ">=3.8.0,<4"
pyyaml = ">=6.0.3,<7"
rattler-build = ">=0.75.0,<0.76"
rich = ">=15.0.0,<16"
tomli = ">=2.4.1,<3"
tomli-w = ">=1.2.0,<2"
types-pyyaml = ">=6.0.12.20260906,<7"
# Dependencies to generate the pypi test indexes
hatchling = ">=1.32.4,<2"
python-build = ">=1.6.0,<2"
#
# Feature for JSON schema generation and testing
#
[feature.schema.dependencies]
jsonschema = ">=4.26.0,<5"
jsonschema-rs = ">=0.56.0,<0.57"
pydantic = ">=2.13.5,<3"
pytest = ">=9.1.1,<10"
pytest-timeout = ">=2.4.0,<3"
python-fastjsonschema = ">=2.22.2,<3"
pyyaml = ">=6.0.3,<7"
tomli = ">=2.4.1,<3"
[feature.schema.tasks]
generate-schema = {
cmd = "python model.py",
cwd = "schema",
description = "Generate JSON schema from model",
}
test-schema = {
cmd = "pytest -s",
cwd = "schema",
depends-on = "generate-schema",
description = "Test the manifest JSON schema",
}
#
# Environment for building and releasing pixi-build-backends
#
[environments.backends-release]
features = ["backends-release-deps", "python"]
solve-group = "python"
[environments.backends-release.activation.env]
RUSTC_WRAPPER = "sccache"
[environments.backends-release.dependencies]
gh = ">=2.101.0,<3"
rattler-build = ">=0.75.0,<0.76"
sccache = ">=0.18.0,<0.19"
[environments.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 = "Release pixi build backends: bump versions or tag and update feedstocks",
}
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",
}
[environments.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 }} \
--env-isolation=none
"""
description = "Build a backend packages"
#
# Default environment, includes the linting and formatting tools
#
[environments.default]
features = [
"rust",
"compilers",
"python",
"python-test-deps",
"dev",
"schema",
"backends-release-deps",
]
solve-group = "python"
[environments.default.dependencies]
actionlint = ">=1.7.12,<2"
cargo-deny = ">=0.20.2,<0.21"
cargo-shear = ">=1.13.4,<2"
dprint = ">=0.50.0,<0.51"
go-shfmt = ">=3.14.1,<4"
ruff = ">=0.16.8,<0.17"
shellcheck = ">=0.11.0,<0.12"
tombi = ">=1.6.0,<2"
ty = ">=0.0.81,<0.0.82"
typos = ">=1.50.2,<2"
zizmor = ">=1.30.1,<2"
[environments.default.tasks]
actionlint = {
cmd = "actionlint",
description = "Lint GitHub Actions workflows",
env = { SHELLCHECK_OPTS = "-e SC2086" },
}
cargo-clippy = {
cmd = "cargo clippy --all-targets --workspace -- -D warnings",
description = "Run clippy on all targets",
}
cargo-deny = {
cmd = "cargo deny --workspace check licenses --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 YAML formatting with dprint",
}
dprint-fmt = {
cmd = "dprint fmt --incremental=false",
description = "Format YAML 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 = "tombi format",
description = "Format TOML files",
}
toml-lint = {
cmd = "tombi lint",
description = "Lint TOML files",
}
typecheck-python = {
cmd = "ty check",
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",
}
#
# Environment for documentation building and deployment
#
[environments.docs]
features = ["python"]
solve-group = "python"
[environments.docs.dependencies]
mdx_truly_sane_lists = ">=1.3,<2"
tomli = ">=2.4.1,<3"
zensical = ">=0.0.63,<0.0.64"
[environments.docs.pypi-dependencies]
# Fork of mike with Zensical support, not released on PyPI
mike = { git = "https://github.com/squidfunk/mike" }
[environments.docs.tasks]
build-docs = {
cmd = "zensical build --strict",
depends-on = ["prepare-docs"],
description = "Build documentation",
}
deploy-dev = {
cmd = "mike deploy --push dev devel",
depends-on = ["prepare-docs"],
description = "Deploy development docs",
}
deploy-latest = {
cmd = "mike deploy --push --update-aliases $RELEASE_VERSION latest",
depends-on = ["prepare-docs"],
description = "Deploy latest release docs",
}
docs = {
cmd = "zensical serve",
depends-on = ["prepare-docs"],
description = "Serve the docs locally",
}
generate-llmstxt = {
cmd = "python scripts/generate_llmstxt.py",
depends-on = ["stage-docs-files"],
description = "Generate llms.txt and llms-full.txt",
}
generate-redirects = {
cmd = "python scripts/generate_redirects.py",
description = "Generate redirect stub pages",
}
mike-serve = {
cmd = "mike serve",
description = "Serve versioned docs with mike",
}
prepare-docs = {
depends-on = ["stage-docs-files", "generate-redirects", "generate-llmstxt"],
description = "Stage docs files, generate redirect stubs and llms.txt",
}
stage-docs-files = {
cmd = "python scripts/stage_docs_files.py",
description = "Stage files from outside the docs directory",
}
#
# Environment for running lefthook (lint orchestration)
#
# Required as it runs pixi tasks itself, so we don't want it to have a dependencies on itself.
[environments.lefthook.dependencies]
lefthook = ">=2.1.14,<3"
[environments.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 for Python integration tests with pytest
#
[environments.python-test]
features = ["python-test-deps", "python"]
solve-group = "python"
[environments.python-test.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 = {
args = [{ arg = "markers", default = "not extra_slow" }],
cmd = "pytest --numprocesses=logical --dist loadgroup --showlocals -vv --verbose -m '{{ markers }}'",
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",
}
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)",
}
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",
}
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)",
}
#
# Environment for release tasks
#
[environments.release.dependencies]
cargo-zigbuild = ">=0.23.4,<0.24"
cffconvert = ">=2.0.0,<3"
git-cliff = ">=2.14.2,<3"
questionary = ">=2.1.1,<3"
tbump = ">=6.9.0,<7"
tomli = ">=2.4.1,<3"
zig = ">=0.16.0,<0.17"
[environments.release.target.win-64.dependencies]
cargo-wix = ">=0.3.9,<0.4"
[environments.release.tasks]
build-msi = {
cmd = "python scripts/build_msi.py",
description = "Build the Windows MSI installer with cargo-wix",
}
build-options = {
cmd = "python scripts/build_options.py",
description = "Write per-target build settings to GITHUB_ENV",
}
create-release = {
cmd = "python scripts/create_release.py",
description = "Create the GitHub release with notes, checksums and artifacts",
}
create-tag = {
cmd = "python scripts/create_tag.py",
description = "Create and push the release git tag idempotently",
}
extract-version = {
cmd = "python scripts/extract_version.py",
description = "Print the release version and tag from crates/pixi/Cargo.toml",
}
package-binary = {
cmd = "python scripts/package_binary.py",
description = "Package a built binary into an archive and stage it",
}
release = {
cmd = "python scripts/release.py",
description = "Run the release script",
}
sign-macos = {
cmd = "python scripts/sign_macos.py",
description = "Codesign and notarize a macOS binary",
}
#
# Environment for Rust building and testing
#
[environments.rust-test]
features = ["rust", "compilers", "python", "dev"]
solve-group = "python"
[environments.rust-test.dependencies]
cargo-insta = ">=1.48.0,<2"
git = ">=2.55.0,<3"
[environments.rust-test.tasks]
build-debug = {
cmd = "cargo build --workspace --bin pixi",
description = "Build pixi in debug mode",
}
build-release = {
cmd = "cargo build --workspace --bin pixi --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",
}
generate-cli-docs = {
cmd = "cargo run --locked --manifest-path crates/pixi_docs/Cargo.toml",
description = "Generate CLI documentation",
}
insta = {
cmd = "cargo insta",
description = "Run cargo-insta commands",
}
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",
}
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",
}
#
# Environment for JSON schema generation and testing
#
[environments.schema]
features = ["schema"]
solve-group = "python"
#
# Environment for test wrapper/aggregator tasks
#
[environments.test]
solve-group = "python"
[environments.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",
}
#
# Environment for building trampolines
#
# CI cross-compiles the trampolines with rustup toolchains for targets that
# conda's rust toolchain cannot provide, so this environment contains no Rust.
[environments.trampoline]
features = ["python"]
solve-group = "python"
[environments.trampoline.dependencies]
zstd = ">=1.5.7,<2"
[environments.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",
}
#
# Package definitions
#
[package]
name = "pixi"
[package.build]
source = { path = "crates/pixi" }
[package.build.backend]
channels = [
"https://prefix.dev/conda-forge",
]
name = "pixi-build-rust"
version = "*"
[package.build.config]
compilers = ["rust", "c"]
[package.build-dependencies]
cmake = ">=4,<5"
pkg-config = ">=0.29.2,<0.30"
rust = "==1.98.1"
[package.build-dependencies."if(linux)"]
clang = ">=22.1.3,<23"
make = ">=4.4.1,<5"
mold = ">=2.40.2,<3"
[package.host-dependencies]
openssl = ">=3.5.4,<4"