-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathpixi.toml
More file actions
259 lines (229 loc) · 9.58 KB
/
pixi.toml
File metadata and controls
259 lines (229 loc) · 9.58 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
[workspace]
description = "Conda package builder, using the rattler rust backend"
authors = ["Wolf Vollprecht <w.vollprecht@gmail.com>"]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]
preview = ['pixi-build']
name = "rattler-build"
[workspace.target.osx.build-variants]
c_compiler_version = ["19"]
[tasks]
build-release = "cargo build --release"
install = "cargo install --path . --locked"
test-end-to-end = { cmd = "pytest test/end-to-end --snapshot-warn-unused --snapshot-details --numprocesses=auto --durations=0", depends-on = [
"build-release",
] }
test-end-to-end-ci = "pytest test/end-to-end --snapshot-warn-unused --snapshot-details --numprocesses=auto --durations=0 -v"
test = "cargo test --workspace --all-targets"
test-slow = "cargo test --release --workspace --all-targets"
test-patch-extra = "cargo test --features patch-test-extra"
test-all = { depends-on = ["test-slow", "test-end-to-end"] }
install-as = { cmd = "python scripts/install.py", depends-on = [
"build-release",
], description = "Install release build to a custom location" }
generate-cli-docs = "cargo run --manifest-path crates/rattler_build_docs/Cargo.toml"
generate-test-data = "cargo r --release --bin patch-apply-gen-test-data"
update-snapshots = "pytest test/end-to-end --snapshot-update"
check-native-tls = "python scripts/check-native-tls.py"
# Playground tasks are in the "playground" environment/feature (see below)
[feature.playground.dependencies]
python = ">=3.12,<4"
clang = ">=21.1.8,<23"
livereload = ">=2.7,<3"
wasm-pack = ">=0.14.0,<0.15"
rust = ">=1.94.0,<1.95"
rust-std-wasm32-unknown-unknown = ">=1.94.0,<1.95"
[feature.playground.tasks]
playground-build = { cmd = "python scripts/build_playground.py", description = "Build the WASM playground", inputs = [
"crates/**",
"scripts/build_playground.py",
"Cargo.lock",
], outputs = [
"deploy/*",
] }
playground-serve = { cmd = "python scripts/serve_playground.py", depends-on = [
"playground-build",
], description = "Serve the playground with live reload on source changes" }
[feature.docs.tasks]
download-font = "bash docs/layouts/download-font-to-cache.sh"
convert-notebooks = { cmd = "jupyter nbconvert --execute --to markdown py-rattler-build/notebooks/*.ipynb --output-dir docs/py-rattler-build/tutorials", inputs = [
"py-rattler-build/notebooks/*.ipynb",
"py-rattler-build/rust/src/**/*.rs",
"py-rattler-build/src/**/*.py",
"src/**/*.rs",
"crates/**/*.rs",
], outputs = [
"docs/py-rattler-build/tutorials/*.md",
] }
validate-recipes = "python docs/scripts/validate_recipes.py"
build-docs = { cmd = "mkdocs build --strict", depends-on = [
"download-font",
"convert-notebooks",
"validate-recipes",
] }
docs = { cmd = "mkdocs serve", depends-on = [
"download-font",
"convert-notebooks",
"validate-recipes",
] }
deploy-latest = { cmd = "mike deploy --push --update-aliases $RELEASE_VERSION latest", depends-on = [
"download-font",
"convert-notebooks",
"validate-recipes",
] }
deploy-dev = { cmd = "mike deploy --push dev devel", depends-on = [
"download-font",
"convert-notebooks",
"validate-recipes",
] }
[dependencies]
openssl = ">=3.6.1,<4"
rust = ">=1.94.0,<1.95"
rust-src = ">=1.94.0,<2"
sccache = ">=0.14.0,<0.15"
compilers = ">=1.11.0,<2"
libssh2 = ">=1.11.1,<2"
pkg-config = ">=0.29.2,<0.30"
cmake = ">=4.2.3,<5"
make = ">=4.4.1,<5"
perl = ">=5.32.1,<5.33"
pytest = ">=8.4.2,<9"
pytest-xdist = ">=3.8.0,<4"
pyyaml = ">=6.0.3,<7"
conda-package-handling = ">=2.4.0,<3"
requests = ">=2.32.5,<3"
syrupy = ">=5.1.0,<6"
boto3 = ">=1.42.66,<2"
[activation.env]
RUSTC_WRAPPER = "sccache"
# 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.
AWS_LC_SYS_CMAKE_BUILDER = "1"
[feature.lint.dependencies]
actionlint = ">=1.7.4,<2"
cargo-deny = ">=0.18.3,<0.19"
prettier = ">=3.7.0,<4"
ruff = ">=0.14.7,<0.15"
shellcheck = ">=0.10.0,<0.11"
taplo = ">=0.9.1,<0.10"
typos = ">=1.23.1,<2"
zizmor = ">=1.18.0,<2"
nbstripout = ">=0.8.2,<0.9"
[feature.lint.tasks]
actionlint = { cmd = "actionlint", env = { SHELLCHECK_OPTS = "-e SC2086" } }
cargo-clippy = "cargo clippy --all-targets --all-features --workspace -- -D warnings -Dclippy::dbg_macro"
cargo-deny = "cargo deny --workspace check license --deny warnings"
cargo-fmt = "cargo fmt"
cargo-fmt-check = "cargo fmt -- --check"
prettier-check = { cmd = "prettier --check", description = "Check YAML formatting with prettier" }
prettier-fmt = { cmd = "prettier --write", description = "Format YAML with prettier" }
nbstripout = "nbstripout"
ruff-format = "ruff format --force-exclude"
ruff-lint = "ruff check --fix --exit-non-zero-on-fix --force-exclude"
toml-format = { cmd = "taplo fmt", env = { RUST_LOG = "warn" } }
toml-lint = "taplo lint --verbose **/pixi.toml"
typos = "typos --force-exclude"
zizmor = { cmd = "zizmor --quiet --min-severity=low .github/", description = "Security audit GitHub Actions" }
[feature.pre-commit.dependencies]
lefthook = ">=2.0.11,<3"
sccache = ">=0.12,<0.13"
[feature.pre-commit.activation.env]
RUSTC_WRAPPER = "sccache"
[feature.pre-commit.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 on all code (no clippy)" }
lint-slow = { cmd = "lefthook run pre-push --all-files --force", description = "Run all slow linters and formatters on all code" }
pre-commit-install = "lefthook install"
pre-commit-install-minimal = "lefthook install pre-commit"
[feature.dev.dependencies]
tbump = ">=6.9.0,<7"
git-cliff = ">=2.12.0,<3"
[feature.dev.tasks]
# Bump version by running `pixi run bump NEW_VERSION`
bump = "tbump --only-patch"
bump-changelog = { cmd = "python scripts/bump_changelog.py", description = "Update changelog with unreleased changes" }
release = { cmd = "python scripts/release.py", description = "Bump version and update lock files" }
[feature.packaging.dependencies]
python = ">=3.13,<3.15"
sccache = ">=0.12,<0.13"
tomlkit = ">=0.13,<0.14"
[feature.packaging.activation.env]
RUSTC_WRAPPER = "sccache"
[feature.packaging.tasks]
build-package = "python scripts/build_package.py"
upload-package = "python scripts/upload_package.py"
[target.linux.dependencies]
clang = ">=18.1.8,<19.0"
mold = ">=2.33.0,<3.0"
patchelf = ">=0.17.2,<0.18"
[target.osx-64.dependencies]
patchelf = ">=0.18.0,<0.19"
[target.osx-arm64.dependencies]
patchelf = ">=0.18.0,<0.19"
[target.linux.activation]
scripts = ["scripts/activate.sh"]
[target.osx.activation]
scripts = ["scripts/activate.sh"]
[target.win.activation]
scripts = ["scripts/activate.bat"]
[feature.docs.dependencies]
cairosvg = ">=2.8.2,<3"
click = "==8.2.1" # Pin click because of https://github.com/mkdocs/mkdocs/issues/4032
mike = ">=2.1.3,<3"
mkdocs = ">=1.6.1,<2"
mkdocs-material = ">=9.7.0,<10"
mkdocstrings = ">=0.30.1,<0.31"
mkdocstrings-python = ">=1.18.2,<2"
pillow = ">=11.3.0,<12"
ruff = ">=0.14.7,<0.15"
py-rattler-build = { path = "./py-rattler-build" }
nbconvert = ">=7.16,<8"
ipykernel = ">=6.29,<7"
[feature.release.dependencies]
python = ">=3.14.3,<3.15"
git-cliff = ">=2.12.0,<3"
release-plz = ">=0.3.157,<0.4"
rust = ">=1.94.0,<1.95"
7zip = ">=26.0,<27"
httpx = ">=0.28.1,<0.29"
[feature.release.tasks]
extract-version = { cmd = "python scripts/extract_version.py", description = "Extract version from Cargo.toml" }
release-plz-pr = { cmd = "python scripts/release_plz_pr.py", description = "Create release PR and sync py-rattler-build Cargo.lock" }
release-plz-release = { cmd = "python scripts/release_plz_release.py", description = "Publish crates and create git tags" }
build-options = { cmd = "python scripts/build_options.py", description = "Determine cargo build/test options for a target" }
package-binary = { cmd = "python scripts/package_binary.py", description = "Package release binary into archive and stage for upload" }
create-tag = { cmd = "python scripts/create_tag.py", description = "Create and push a git tag idempotently" }
sign-macos = { cmd = "python scripts/sign_macos.py", description = "Sign and notarize macOS binaries" }
sign-windows-extract = { cmd = "python scripts/sign_windows.py extract", description = "Extract Windows executables for signing" }
sign-windows-repackage = { cmd = "python scripts/sign_windows.py repackage", description = "Repackage signed Windows executables" }
save-attestation = { cmd = "python scripts/save_attestation.py", description = "Save attestation bundle" }
create-release = { cmd = "python scripts/create_release.py", description = "Create GitHub release with all artifacts" }
[environments]
default = { features = ["dev"], solve-group = "default" }
docs = { features = ["docs"], no-default-feature = true }
lint = { features = ["lint"], solve-group = "default" }
pre-commit = { features = ["pre-commit"], no-default-feature = true }
packaging = { features = ["packaging"], no-default-feature = true }
playground = { features = ["playground"], no-default-feature = true }
release = { features = ["release"], no-default-feature = true }
# pixi build
[package]
name.workspace = true
[package.build.backend]
name = "pixi-build-rust"
version = "*"
channels = [
"https://prefix.dev/pixi-build-backends",
"https://prefix.dev/conda-forge",
]
[package.build-dependencies]
cmake = ">=4.3.0, <5"
[package.build.config]
compilers = ["rust", "c"]
# 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.
env = { AWS_LC_SYS_CMAKE_BUILDER = "1" }