Skip to content

Commit

Permalink
Make dora cli pip installable (#706)
Browse files Browse the repository at this point in the history
This PR makes dora-cli pip installable with

```bash
pip install dora-rs-cli
```

This is a pretty big deal to make pre-compiled dora-cli easily available
in China, where pip is widely mirrored

It fixes some abi3 issues from #695 such as not being a cdylib and
python project.
  • Loading branch information
haixuanTao authored Nov 11, 2024
2 parents d6cb7c6 + b1a125d commit e98d81d
Show file tree
Hide file tree
Showing 6 changed files with 748 additions and 677 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

11 changes: 11 additions & 0 deletions binaries/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ path = "src/main.rs"
[features]
default = ["tracing"]
tracing = ["dep:dora-tracing"]
python = ["pyo3"]

[dependencies]
clap = { version = "4.0.3", features = ["derive"] }
Expand Down Expand Up @@ -49,3 +50,13 @@ tabwriter = "1.4.0"
log = { version = "0.4.21", features = ["serde"] }
colored = "2.1.0"
env_logger = "0.11.3"
pyo3 = { workspace = true, features = [
"extension-module",
"abi3",
], optional = true }


[lib]
name = "dora_cli"
path = "src/lib.rs"
crate-type = ["lib", "cdylib"]
6 changes: 6 additions & 0 deletions binaries/cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ build-backend = "maturin"

[project]
name = "dora-rs-cli"

scripts = { "dora" = "dora_cli:py_main" }


[tool.maturin]
features = ["python", "pyo3/extension-module"]
Loading

0 comments on commit e98d81d

Please sign in to comment.