forked from prefix-dev/rattler-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.toml
More file actions
216 lines (190 loc) · 7.23 KB
/
pixi.toml
File metadata and controls
216 lines (190 loc) · 7.23 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
[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 = "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" }
test-ci = "cargo test --release -p rust-tests"
generate-cli-docs = "mkdir -p src/bin && cp docs/generator/* src/bin && cargo add clap-markdown --git https://github.com/ruben-arts/clap-markdown --branch main && cargo run --bin generate-cli-docs --features generate-cli-docs > docs/reference/cli.md && cargo rm clap-markdown && rm -rf src/bin"
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)
# Expects `rustup` and `wasm-pack` to be installed on the host system
[feature.playground.dependencies]
python = ">=3.12,<4"
clang = ">=21.1.8,<23"
livereload = ">=2.7,<3"
[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.*"
rust = ">=1.93.1,<1.94"
rust-src = ">=1.93.1,<1.94"
compilers = ">=1.11.0,<2"
libssh2 = "1.11.0.*"
pkg-config = "0.29.2.*"
cmake = "3.27.6.*"
make = "4.3.*"
perl = "5.32.1.*"
pytest = "7.4.2.*"
pytest-xdist = ">=3.6.1,<4"
pyyaml = ">=6.0.1,<6.1"
conda-package-handling = "2.2.0.*"
requests = ">=2.32.2,<2.33"
syrupy = "4.6.*"
boto3 = "*"
[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"
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"
[feature.pre-commit.dependencies]
lefthook = ">=2.0.11,<3"
[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 = "*"
[feature.dev.tasks]
# Bump version by running `pixi run bump NEW_VERSION`
bump = "tbump --only-patch"
[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-64.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-64.activation]
scripts = ["scripts/activate.sh"]
[target.osx-arm64.activation]
scripts = ["scripts/activate.sh"]
[target.win-64.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"
[environments]
default = { features = [
"dev",
], solve-group = "default" } # Using same solve group to keep the environment consistent in versions used and improving cache hits
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 }
# 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.config]
compilers = ["rust", "c"]