fix py feature
cargo devel CI / cargo CI (push) Failing after 1m55s Details

This commit is contained in:
Christoph J. Scherr 2024-02-28 22:06:55 +01:00
parent faa4023f95
commit c9523578e9
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
4 changed files with 17 additions and 27 deletions

View File

@ -5,9 +5,11 @@ members = [
"members/libpt-core",
"members/libpt-math",
"members/libpt-log",
"members/libpt-net", "members/libpt-py",
"members/libpt-net",
"members/libpt-py",
]
default-members = [".", "members/libpt-core"]
[workspace.package]
publish = true
version = "0.3.11"
@ -18,7 +20,7 @@ description = "Personal multitool"
readme = "README.md"
homepage = "https://git.cscherr.de/PlexSheep/pt"
repository = "https://git.cscherr.de/PlexSheep/pt"
keywords = ["cli", "library"]
keywords = ["library"]
categories = [
"command-line-utilities",
"development-tools",
@ -52,10 +54,11 @@ categories.workspace = true
[features]
default = ["log", "core"]
core = []
math = ["dep:libpt-math"]
full = ["default", "core", "math", "log", "bintols", "net", "py"]
math = ["dep:libpt-math", "log"]
log = ["dep:libpt-log"]
bintols = ["dep:libpt-bintols"]
net = ["dep:libpt-net"]
bintols = ["dep:libpt-bintols", "log"]
net = ["dep:libpt-net", "log"]
py = ["dep:libpt-py"]
[lib]

View File

@ -1,12 +1,16 @@
[package]
name = "libpt-py"
version = "0.3.11"
edition = "2021"
edition.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "libpt"
crate-type = ["cdylib"]
[dependencies]
pyo3 = { version = "0.19.0", features = ["full", "extension-module"] }
pyo3 = "0.19.0"
[lib]
crate-type = ["cdylib", "rlib"]

View File

@ -1,16 +0,0 @@
[build-system]
requires = ["maturin>=1.1,<2.0"]
build-backend = "maturin"
[project]
name = "libpt"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[tool.maturin]
features = ["pyo3/extension-module"]

View File

@ -8,7 +8,6 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
/// A Python module implemented in Rust.
#[pymodule]
#[pyo3(name="libpt")]
fn libpt_py(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
Ok(())