build(stream-gears): make crate cargo-testable, drop unused deps (#1724)
* build(stream-gears): enable pyo3 extension-module via default crate feature Plain cargo build/test of stream-gears no longer links libpython, so it works without Python dev files. build.rs adds the macOS cdylib link args that maturin would otherwise pass. Wheel builds are unaffected: maturin already enabled pyo3/extension-module through pyproject.toml. Ref #1721 * build(stream-gears): drop 13 unused dependencies and biliup-cli python-bridge feature bytes, ormlite, rust-embed, mime_guess, tower-http, sqlx, serde, thiserror, futures, async-channel, url, chrono and fancy-regex have no references under crates/stream-gears/src. The python-bridge feature of biliup-cli is declared but never used by any cfg or dependent crate. Ref #1721 * ci(test): run cargo test for the whole workspace including stream-gears Ref #1721
This commit is contained in:
5 files changed
+14
-58
No files matched your search
@@ -27,4 +27,4 @@ jobs:
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run tests
|
||||
run: cargo test --locked -p biliup -p biliup-cli -p danmaku
|
||||
run: cargo test --locked --workspace
|
||||
Generated
+1
-39
@@ -533,21 +533,6 @@ dependencies = [
|
||||
"urlencoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
|
||||
dependencies = [
|
||||
"bit-vec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
|
||||
|
||||
[[package]]
|
||||
name = "bit_field"
|
||||
version = "0.10.3"
|
||||
@@ -1409,17 +1394,6 @@ dependencies = [
|
||||
"zune-inflate",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fancy-regex"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72cf461f865c862bb7dc573f643dd6a2b6842f7c30b07882b56bd148cc2761b8"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.4.1"
|
||||
@@ -4437,36 +4411,24 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
||||
name = "stream-gears"
|
||||
version = "1.2.8"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-trait",
|
||||
"axum",
|
||||
"biliup",
|
||||
"biliup-cli",
|
||||
"bon",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"clap",
|
||||
"danmaku",
|
||||
"error-stack",
|
||||
"fancy-regex",
|
||||
"futures",
|
||||
"mime_guess",
|
||||
"nom 8.0.0",
|
||||
"ormlite",
|
||||
"pyo3",
|
||||
"pyo3-build-config",
|
||||
"pythonize",
|
||||
"rust-embed",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
"thiserror 2.0.18",
|
||||
"time",
|
||||
"tokio",
|
||||
"tower-http",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-subscriber",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -78,9 +78,5 @@ struct-patch = "0.10.4"
|
||||
shellexpand = "3.1"
|
||||
dirs = "6.0"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
python-bridge = []
|
||||
|
||||
[dev-dependencies]
|
||||
m3u8-rs = "6"
|
||||
@@ -8,35 +8,30 @@ edition = "2024"
|
||||
name = "stream_gears"
|
||||
crate-type = ["cdylib", "lib"]
|
||||
|
||||
[features]
|
||||
default = ["extension-module"]
|
||||
# Skips linking libpython so plain `cargo build` / `cargo test` work without Python dev files;
|
||||
# `--no-default-features` is only needed for Rust tests that embed an interpreter.
|
||||
extension-module = ["pyo3/extension-module"]
|
||||
|
||||
[dependencies]
|
||||
pyo3 = { version = "0.27.1", features = ["abi3-py39", "anyhow"] }
|
||||
pythonize = { version = "0.27.0" }
|
||||
bytes = { workspace = true }
|
||||
ormlite = { version = "0.24.1", features = ["sqlite", "chrono"] }
|
||||
rust-embed = "8.7.2"
|
||||
mime_guess = "2.0.5"
|
||||
axum = { version = "0.8", features = ["macros"] }
|
||||
tower-http = { version = "0.6.2", features = ["cors"] }
|
||||
sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "sqlite" ] }
|
||||
nom = "8"
|
||||
serde = "1"
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|
||||
tracing-appender = { workspace = true }
|
||||
|
||||
thiserror = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
async-channel = { version = "2.5.0" }
|
||||
biliup = { path = "../biliup"}
|
||||
biliup-cli = { path = "../biliup-cli"}
|
||||
danmaku-client = { package = "danmaku", path = "../danmaku"}
|
||||
url = { workspace = true }
|
||||
time = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
fancy-regex = { version = "0.17.0"}
|
||||
bon = { workspace = true }
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
async-trait = { workspace = true }
|
||||
error-stack = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
pyo3-build-config = "0.27.1"
|
||||
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
pyo3_build_config::add_extension_module_link_args();
|
||||
}
|
||||
Reference in new issue
Block a user