generated from PlexSheep/baserepo
devel #73
13
Cargo.toml
13
Cargo.toml
|
@ -5,9 +5,11 @@ members = [
|
||||||
"members/libpt-core",
|
"members/libpt-core",
|
||||||
"members/libpt-math",
|
"members/libpt-math",
|
||||||
"members/libpt-log",
|
"members/libpt-log",
|
||||||
"members/libpt-net", "members/libpt-py",
|
"members/libpt-net",
|
||||||
|
"members/libpt-py",
|
||||||
]
|
]
|
||||||
default-members = [".", "members/libpt-core"]
|
default-members = [".", "members/libpt-core"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
publish = true
|
publish = true
|
||||||
version = "0.3.11"
|
version = "0.3.11"
|
||||||
|
@ -18,7 +20,7 @@ description = "Personal multitool"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
homepage = "https://git.cscherr.de/PlexSheep/pt"
|
homepage = "https://git.cscherr.de/PlexSheep/pt"
|
||||||
repository = "https://git.cscherr.de/PlexSheep/pt"
|
repository = "https://git.cscherr.de/PlexSheep/pt"
|
||||||
keywords = ["cli", "library"]
|
keywords = ["library"]
|
||||||
categories = [
|
categories = [
|
||||||
"command-line-utilities",
|
"command-line-utilities",
|
||||||
"development-tools",
|
"development-tools",
|
||||||
|
@ -52,10 +54,11 @@ categories.workspace = true
|
||||||
[features]
|
[features]
|
||||||
default = ["log", "core"]
|
default = ["log", "core"]
|
||||||
core = []
|
core = []
|
||||||
math = ["dep:libpt-math"]
|
full = ["default", "core", "math", "log", "bintols", "net", "py"]
|
||||||
|
math = ["dep:libpt-math", "log"]
|
||||||
log = ["dep:libpt-log"]
|
log = ["dep:libpt-log"]
|
||||||
bintols = ["dep:libpt-bintols"]
|
bintols = ["dep:libpt-bintols", "log"]
|
||||||
net = ["dep:libpt-net"]
|
net = ["dep:libpt-net", "log"]
|
||||||
py = ["dep:libpt-py"]
|
py = ["dep:libpt-py"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
|
@ -69,4 +69,4 @@ docs/_build/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
# Pyenv
|
# Pyenv
|
||||||
.python-version
|
.python-version
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
[package]
|
[package]
|
||||||
name = "libpt-py"
|
name = "libpt-py"
|
||||||
version = "0.3.11"
|
version = "0.3.11"
|
||||||
edition = "2021"
|
edition.workspace = true
|
||||||
|
|
||||||
|
[package.metadata.maturin]
|
||||||
|
name = "libpt"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
[lib]
|
[lib]
|
||||||
name = "libpt"
|
crate-type = ["cdylib", "rlib"]
|
||||||
crate-type = ["cdylib"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
pyo3 = { version = "0.19.0", features = ["full", "extension-module"] }
|
pyo3 = "0.19.0"
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["maturin>=1.1,<2.0"]
|
requires = ["maturin>=1.4,<2.0"]
|
||||||
build-backend = "maturin"
|
build-backend = "maturin"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "libpt"
|
name = "libpt"
|
||||||
requires-python = ">=3.7"
|
requires-python = ">=3.8"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Programming Language :: Rust",
|
"Programming Language :: Rust",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
]
|
]
|
||||||
|
dynamic = ["version"]
|
||||||
|
|
||||||
[tool.maturin]
|
[tool.maturin]
|
||||||
features = ["pyo3/extension-module"]
|
features = ["pyo3/extension-module"]
|
||||||
|
|
|
@ -8,7 +8,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
|
||||||
|
|
||||||
/// A Python module implemented in Rust.
|
/// A Python module implemented in Rust.
|
||||||
#[pymodule]
|
#[pymodule]
|
||||||
#[pyo3(name="libpt")]
|
#[pyo3(name = "libpt")]
|
||||||
fn libpt_py(_py: Python, m: &PyModule) -> PyResult<()> {
|
fn libpt_py(_py: Python, m: &PyModule) -> PyResult<()> {
|
||||||
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
|
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Reference in New Issue