featurizing the library
cargo devel CI / cargo CI (push) Successful in 1m55s Details

This commit is contained in:
Christoph J. Scherr 2024-02-28 16:30:32 +01:00
parent d6d751d0b5
commit 7930edc7e6
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
4 changed files with 32 additions and 10 deletions

View File

@ -5,7 +5,7 @@ members = [
"members/libpt-core", "members/libpt-core",
"members/libpt-math", "members/libpt-math",
"members/libpt-log", "members/libpt-log",
"members/libpt-net", "members/libpt-net", "members/libpt-py",
] ]
default-members = [".", "members/libpt-core"] default-members = [".", "members/libpt-core"]
[workspace.package] [workspace.package]
@ -33,6 +33,7 @@ libpt-bintols = { version = "0.3.11", path = "members/libpt-bintols" }
libpt-log = { version = "0.3.11", path = "members/libpt-log" } libpt-log = { version = "0.3.11", path = "members/libpt-log" }
libpt-math = { version = "0.3.11", path = "members/libpt-math" } libpt-math = { version = "0.3.11", path = "members/libpt-math" }
libpt-net = { version = "0.3.11", path = "members/libpt-net" } libpt-net = { version = "0.3.11", path = "members/libpt-net" }
libpt-py = { version = "0.3.11", path = "members/libpt-py" }
[package] [package]
name = "libpt" name = "libpt"
@ -51,10 +52,11 @@ categories.workspace = true
[features] [features]
default = ["log", "core"] default = ["log", "core"]
core = [] core = []
math = [] math = ["dep:libpt-math"]
log = [] log = ["dep:libpt-log"]
bintols = [] bintols = ["dep:libpt-bintols"]
net = [] net = ["dep:libpt-net"]
py = ["dep:libpt-py"]
[lib] [lib]
name = "libpt" name = "libpt"
@ -65,9 +67,9 @@ crate-type = [
] ]
[dependencies] [dependencies]
# FIXME: We don't want to compile all of the member crates regardless of features
libpt-core = { workspace = true } libpt-core = { workspace = true }
libpt-bintols = { workspace = true } libpt-bintols = { workspace = true, optional = true }
libpt-log = { workspace = true } libpt-log = { workspace = true, optional = true }
libpt-math = { workspace = true } libpt-math = { workspace = true, optional = true }
libpt-net = { workspace = true } libpt-net = { workspace = true, optional = true }
libpt-py = { workspace = true, optional = true }

View File

@ -0,0 +1,18 @@
[package]
name = "libpt-py"
publish.workspace = true
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
pyo3 = { version = "0.20.3", features = ["full"] }

View File

View File

@ -18,3 +18,5 @@ pub use libpt_log as log;
pub use libpt_math as math; pub use libpt_math as math;
#[cfg(feature = "net")] #[cfg(feature = "net")]
pub use libpt_net as net; pub use libpt_net as net;
#[cfg(feature = "py")]
pub use libpt_py as py;