Skip to content

Commit

Permalink
feat: pixi build compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Dec 5, 2024
1 parent c125172 commit 76d6bc8
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 39 deletions.
1 change: 1 addition & 0 deletions py-rattler/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/target
!Cargo.lock
!pixi.lock
.*/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
74 changes: 61 additions & 13 deletions py-rattler/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions py-rattler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ anyhow = "1.0.92"
chrono = { version = "0.4" }
futures = "0.3.31"

rattler = { path = "../crates/rattler", default-features = false, features = [
rattler = { version = "0.28.4", default-features = false, features = [
"indicatif",
] }
rattler_repodata_gateway = { path = "../crates/rattler_repodata_gateway", default-features = false, features = [
rattler_repodata_gateway = { version = "0.21.24", default-features = false, features = [
"sparse",
"gateway",
] }
rattler_conda_types = { path = "../crates/rattler_conda_types", default-features = false }
rattler_digest = { path = "../crates/rattler_digest" }
rattler_networking = { path = "../crates/rattler_networking", default-features = false, features = [
rattler_conda_types = { version="0.29.3", default-features = false }
rattler_digest = { version="1.0.3" }
rattler_networking = { version = "0.21.7", default-features = false, features = [
"gcs",
] }
rattler_shell = { path = "../crates/rattler_shell", default-features = false }
rattler_virtual_packages = { path = "../crates/rattler_virtual_packages", default-features = false }
rattler_solve = { path = "../crates/rattler_solve", default-features = false, features = [
rattler_shell = { version = "0.22.8", default-features = false }
rattler_virtual_packages = { version="1.1.11", default-features = false }
rattler_solve = { version="1.2.4", default-features = false, features = [
"resolvo",
] }
rattler_index = { path = "../crates/rattler_index" }
rattler_lock = { path = "../crates/rattler_lock", default-features = false }
rattler_package_streaming = { path = "../crates/rattler_package_streaming", default-features = false }
rattler_index = { version="0.19.37" }
rattler_lock = { version="0.22.32", default-features = false }
rattler_package_streaming = { version="0.22.15", default-features = false }
pyo3 = { version = "0.22.5", features = [
"abi3-py38",
"extension-module",
Expand Down
49 changes: 35 additions & 14 deletions py-rattler/pixi.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
[project]
[workspace]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
preview = ["pixi-build"]

#
# Package section
#
# This defines the package metadata, build-system and dependencies
#

[package]
name = "py-rattler"
version = "0.8.2"
description = "Add a short description here"
authors = [
"Bas Zalmstra <bas@prefix.dev>",
"Tarun Pratap Singh <pratapsinghtarun9@gmail.com>",
]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
license = "BSD-3-Clause"

[tasks]
[build-system]
build-backend = { name = "pixi-build-python", version = "*" }
channels = [
"https://prefix.dev/pixi-build-backends",
"https://prefix.dev/conda-forge",
]

[feature.build.dependencies]
maturin = "~=1.2.2"
pip = "~=23.2.1"
rust = "~=1.81.0"
[build-backend.pixi-build-python]
# py-rattler is an arch specific package.
noarch = false

[feature.build.tasks]
build = "PIP_REQUIRE_VIRTUALENV=false maturin develop"
build-release = "PIP_REQUIRE_VIRTUALENV=false maturin develop --release"
[host-dependencies]
maturin = "~=1.7.7"
rust = "~=1.81.0"
uv = "*"

[feature.build.target.linux-64.dependencies]
[target.linux-64.dependencies]
patchelf = "~=0.17.2"

[feature.build.dependencies]
py-rattler = { path = "." }


[tasks]

[feature.test.dependencies]
# Python 3.8 is the minimum supported version, so we use that for testing
python = "3.9.*"
Expand All @@ -41,14 +62,14 @@ typer = "*"
types-networkx = "*"

[feature.test.tasks]
test = { cmd = "pytest --doctest-modules", depends_on = ["build"] }
test = { cmd = "pytest --doctest-modules" }
fmt-python = "ruff format rattler examples tests"
fmt-rust = "cargo fmt --all"
lint-python = "ruff check ."
lint-rust = "cargo clippy --all"
fmt = { depends_on = ["fmt-python", "fmt-rust"] }
lint = { depends_on = ["type-check", "lint-python", "lint-rust"] }
type-check = { cmd = "mypy", depends_on = ["build"] }
type-check = { cmd = "mypy" }

# checks for the CI
fmt-rust-check = "cargo fmt --all --check"
Expand Down
2 changes: 1 addition & 1 deletion py-rattler/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin~=1.2.1"]
requires = ["maturin~=1.7.7"]
build-backend = "maturin"

[project]
Expand Down

0 comments on commit 76d6bc8

Please sign in to comment.