diff --git a/Cargo.toml b/Cargo.toml index cd7572f..1ddcddf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,22 +2,22 @@ resolver = "2" members = [ ".", - "members/pt-core", - "members/pt-bintols", - "members/pt-math", - "members/pt-bin", - "members/pt-log", - "members/pt-net", - "members/pt-py", - "members/pt-hedu", + "members/libpt-core", + "members/libpt-bintols", + "members/libpt-math", + "members/libpt-bin", + "members/libpt-log", + "members/libpt-net", + "members/libpt-py", + "members/libpt-hedu", ] default-members = [ ".", - "members/pt-bin", - "members/pt-core", - "members/pt-py", - "members/pt-log", - "members/pt-math", + "members/libpt-bin", + "members/libpt-core", + "members/libpt-py", + "members/libpt-log", + "members/libpt-math", ] [workspace.package] publish = false @@ -27,8 +27,8 @@ authors = ["Christoph J. Scherr "] license = "MIT" description = "Personal multitool" readme = "README.md" -homepage = "https://git.cscherr.de/PlexSheep/pt" -repository = "https://git.cscherr.de/PlexSheep/pt" +homepage = "https://git.cscherr.de/PlexSheep/libpt" +repository = "https://git.cscherr.de/PlexSheep/libpt" keywords = ["cli", "python", "scriptable", "pyo3", "library"] categories = ["command-line-utilities", "development-tools", "development-tools::ffi"] @@ -50,8 +50,17 @@ keywords.workspace = true categories.workspace = true [features] -default = ["core", "log"] -core = [] +default = ["log"] +all = [ + "default", + "math", + "log", + "bintols", + "net", + "ccc", + "hedu" +] +fw = [] math = [] log = [] bintols = [] @@ -63,16 +72,17 @@ hedu = ["bintols"] name = "libpt" crate-type = [ "dylib", # .dll, .so, .dynlib - "staticlib" # .lib, .a + "staticlib", # .lib, .a + "rlib" ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -pt-bintols = { version = "0.1.7", path = "members/pt-bintols" } -pt-core = { version = "0.1.7", path = "members/pt-core" } -pt-hedu = { version = "0.1.7", path = "members/pt-hedu" } -pt-log = { version = "0.1.7", path = "members/pt-log" } -pt-math = { version = "0.1.7", path = "members/pt-math" } -pt-net = { version = "0.1.7", path = "members/pt-net" } -pt-ccc = { version = "0.1.7", path = "members/pt-ccc" } +libpt-bintols = { version = "0.1.7", path = "members/libpt-bintols" } +libpt-core = { version = "0.1.7", path = "members/libpt-core" } +libpt-hedu = { version = "0.1.7", path = "members/libpt-hedu" } +libpt-log = { version = "0.1.7", path = "members/libpt-log" } +libpt-math = { version = "0.1.7", path = "members/libpt-math" } +libpt-net = { version = "0.1.7", path = "members/libpt-net" } +libpt-ccc = { version = "0.1.7", path = "members/libpt-ccc" } diff --git a/members/pt-bin/Cargo.toml b/members/libpt-bin/Cargo.toml similarity index 95% rename from members/pt-bin/Cargo.toml rename to members/libpt-bin/Cargo.toml index d2d552f..a73a04e 100644 --- a/members/pt-bin/Cargo.toml +++ b/members/libpt-bin/Cargo.toml @@ -1,6 +1,6 @@ [package] autobins = true -name = "pt-bin" +name = "libpt-bin" publish.workspace = true version.workspace = true edition.workspace = true @@ -20,7 +20,7 @@ name = "ccc" path = "src/ccc/mod.rs" [[bin]] -name = "pt" +name = "libpt" path = "src/main/mod.rs" [dependencies] diff --git a/members/pt-bin/src/ccc/mod.rs b/members/libpt-bin/src/ccc/mod.rs similarity index 100% rename from members/pt-bin/src/ccc/mod.rs rename to members/libpt-bin/src/ccc/mod.rs diff --git a/members/pt-bin/src/main/args.rs b/members/libpt-bin/src/main/args.rs similarity index 97% rename from members/pt-bin/src/main/args.rs rename to members/libpt-bin/src/main/args.rs index d06192f..e7313f3 100644 --- a/members/pt-bin/src/main/args.rs +++ b/members/libpt-bin/src/main/args.rs @@ -1,6 +1,6 @@ //! # args module //! -//! The args module of pt is used to parse commandline arguments. For this, it makes use of +//! The args module of libpt is used to parse commandline arguments. For this, it makes use of //! [`clap`]. //// ATTRIBUTES //////////////////////////////////////////////////////////////////////////////////// diff --git a/members/pt-bin/src/main/mod.rs b/members/libpt-bin/src/main/mod.rs similarity index 99% rename from members/pt-bin/src/main/mod.rs rename to members/libpt-bin/src/main/mod.rs index 58bedfc..86af0da 100644 --- a/members/pt-bin/src/main/mod.rs +++ b/members/libpt-bin/src/main/mod.rs @@ -1,4 +1,4 @@ -//! # Main executable of pt +//! # Main executable of libpt //! //! This module contains all code specific to the executable version of [`pt`]: [`pt`](crate). //! diff --git a/members/pt-bintols/Cargo.toml b/members/libpt-bintols/Cargo.toml similarity index 75% rename from members/pt-bintols/Cargo.toml rename to members/libpt-bintols/Cargo.toml index 966f109..0e8cb22 100644 --- a/members/pt-bintols/Cargo.toml +++ b/members/libpt-bintols/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-bintols" +name = "libpt-bintols" publish.workspace = true version.workspace = true edition.workspace = true @@ -16,5 +16,5 @@ categories.workspace = true [dependencies] num-traits = "0.2.16" -pt-core = { version = "0.1.0", path = "../pt-core" } -pt-log = { version = "0.1.0", path = "../pt-log" } +libpt-core = { version = "0.1.0", path = "../libpt-core" } +libpt-log = { version = "0.1.0", path = "../libpt-log" } diff --git a/members/pt-bintols/src/datalayout.rs b/members/libpt-bintols/src/datalayout.rs similarity index 100% rename from members/pt-bintols/src/datalayout.rs rename to members/libpt-bintols/src/datalayout.rs diff --git a/members/pt-bintols/src/display.rs b/members/libpt-bintols/src/display.rs similarity index 100% rename from members/pt-bintols/src/display.rs rename to members/libpt-bintols/src/display.rs diff --git a/members/pt-bintols/src/lib.rs b/members/libpt-bintols/src/lib.rs similarity index 97% rename from members/pt-bintols/src/lib.rs rename to members/libpt-bintols/src/lib.rs index bde66a0..ca13f78 100644 --- a/members/pt-bintols/src/lib.rs +++ b/members/libpt-bintols/src/lib.rs @@ -22,6 +22,6 @@ pub const ZEBI: u128 = 2u128.pow(70); /// 2^80 pub const YOBI: u128 = 2u128.pow(80); -// use pt_core; +// use libpt_core; pub mod datalayout; pub mod display; diff --git a/members/pt-bintols/tests/datalayout.rs b/members/libpt-bintols/tests/datalayout.rs similarity index 82% rename from members/pt-bintols/tests/datalayout.rs rename to members/libpt-bintols/tests/datalayout.rs index f6582eb..30a2012 100644 --- a/members/pt-bintols/tests/datalayout.rs +++ b/members/libpt-bintols/tests/datalayout.rs @@ -1,4 +1,4 @@ -use pt_bintols::*; +use libpt_bintols::*; #[test] fn mkdmp() { diff --git a/members/pt-bintols/tests/display.rs b/members/libpt-bintols/tests/display.rs similarity index 97% rename from members/pt-bintols/tests/display.rs rename to members/libpt-bintols/tests/display.rs index a6ac00c..20e232c 100644 --- a/members/pt-bintols/tests/display.rs +++ b/members/libpt-bintols/tests/display.rs @@ -1,5 +1,5 @@ -use pt_bintols::*; -use pt_bintols::display::*; +use libpt_bintols::*; +use libpt_bintols::display::*; #[test] fn btobin() { diff --git a/members/pt-ccc/Cargo.toml b/members/libpt-ccc/Cargo.toml similarity index 69% rename from members/pt-ccc/Cargo.toml rename to members/libpt-ccc/Cargo.toml index d2d3e55..a0036d8 100644 --- a/members/pt-ccc/Cargo.toml +++ b/members/libpt-ccc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-ccc" +name = "libpt-ccc" publish.workspace = true version.workspace = true edition.workspace = true @@ -17,6 +17,6 @@ categories.workspace = true [dependencies] num = "0.4.1" num-traits = "0.2.16" -pt-core = { version = "0.1.7", path = "../pt-core" } -pt-log = { version = "0.1.7", path = "../pt-log" } -pt-math = { version = "0.1.7", path = "../pt-math" } +libpt-core = { version = "0.1.7", path = "../libpt-core" } +libpt-log = { version = "0.1.7", path = "../libpt-log" } +libpt-math = { version = "0.1.7", path = "../libpt-math" } diff --git a/members/pt-ccc/src/base.rs b/members/libpt-ccc/src/base.rs similarity index 99% rename from members/pt-ccc/src/base.rs rename to members/libpt-ccc/src/base.rs index f95f6ca..0ac39bf 100644 --- a/members/pt-ccc/src/base.rs +++ b/members/libpt-ccc/src/base.rs @@ -16,9 +16,9 @@ use std::fmt::Display; pub use num_traits::PrimInt; #[allow(unused_imports)] // we possibly want to use all log levels -use pt_log::*; +use libpt_log::*; #[allow(unused_imports)] // import more complex math stuff from there -use pt_math; +use libpt_math; //// TYPES ///////////////////////////////////////////////////////////////////////////////////////// /// Quick Result with a ccc error diff --git a/members/pt-ccc/src/lib.rs b/members/libpt-ccc/src/lib.rs similarity index 99% rename from members/pt-ccc/src/lib.rs rename to members/libpt-ccc/src/lib.rs index b581afa..9eae498 100644 --- a/members/pt-ccc/src/lib.rs +++ b/members/libpt-ccc/src/lib.rs @@ -25,9 +25,9 @@ pub mod term; pub use term::*; #[allow(unused_imports)] // we possibly want to use all log levels -use pt_log::*; +use libpt_log::*; #[allow(unused_imports)] // import more complex math stuff from there -use pt_math; +use libpt_math; //// TYPES ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/members/pt-ccc/src/term.rs b/members/libpt-ccc/src/term.rs similarity index 99% rename from members/pt-ccc/src/term.rs rename to members/libpt-ccc/src/term.rs index 8d553f5..f872fe5 100644 --- a/members/pt-ccc/src/term.rs +++ b/members/libpt-ccc/src/term.rs @@ -22,9 +22,9 @@ use std::collections::VecDeque; //// IMPORTS /////////////////////////////////////////////////////////////////////////////////////// pub use super::{Error, Result, Value, base::{self, *}}; #[allow(unused_imports)] // we possibly want to use all log levels -use pt_log::*; +use libpt_log::*; #[allow(unused_imports)] // import more complex math stuff from there -use pt_math; +use libpt_math; //// TYPES ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/members/pt-core/Cargo.toml b/members/libpt-core/Cargo.toml similarity index 93% rename from members/pt-core/Cargo.toml rename to members/libpt-core/Cargo.toml index 4468176..7ae9aaf 100644 --- a/members/pt-core/Cargo.toml +++ b/members/libpt-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-core" +name = "libpt-core" publish.workspace = true version.workspace = true edition.workspace = true diff --git a/members/pt-core/src/lib.rs b/members/libpt-core/src/lib.rs similarity index 100% rename from members/pt-core/src/lib.rs rename to members/libpt-core/src/lib.rs diff --git a/members/pt-core/src/macros.rs b/members/libpt-core/src/macros.rs similarity index 100% rename from members/pt-core/src/macros.rs rename to members/libpt-core/src/macros.rs diff --git a/members/pt-core/src/printing.rs b/members/libpt-core/src/printing.rs similarity index 100% rename from members/pt-core/src/printing.rs rename to members/libpt-core/src/printing.rs diff --git a/members/pt-hedu/Cargo.toml b/members/libpt-hedu/Cargo.toml similarity index 95% rename from members/pt-hedu/Cargo.toml rename to members/libpt-hedu/Cargo.toml index b207553..69e30fe 100644 --- a/members/pt-hedu/Cargo.toml +++ b/members/libpt-hedu/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-hedu" +name = "libpt-hedu" publish.workspace = true version.workspace = true edition.workspace = true diff --git a/members/pt-hedu/src/lib.rs b/members/libpt-hedu/src/lib.rs similarity index 100% rename from members/pt-hedu/src/lib.rs rename to members/libpt-hedu/src/lib.rs diff --git a/members/pt-log/Cargo.toml b/members/libpt-log/Cargo.toml similarity index 95% rename from members/pt-log/Cargo.toml rename to members/libpt-log/Cargo.toml index 0fa9818..3be6bca 100644 --- a/members/pt-log/Cargo.toml +++ b/members/libpt-log/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-log" +name = "libpt-log" publish.workspace = true version.workspace = true edition.workspace = true diff --git a/members/pt-log/src/error.rs b/members/libpt-log/src/error.rs similarity index 100% rename from members/pt-log/src/error.rs rename to members/libpt-log/src/error.rs diff --git a/members/pt-log/src/lib.rs b/members/libpt-log/src/lib.rs similarity index 99% rename from members/pt-log/src/lib.rs rename to members/libpt-log/src/lib.rs index 71b736e..ee73ee7 100644 --- a/members/pt-log/src/lib.rs +++ b/members/libpt-log/src/lib.rs @@ -105,7 +105,7 @@ impl Logger { // // // if it's this lib, continue // filter |= metadata.target().contains(env!("CARGO_PKG_NAME")); - // filter |= metadata.target().contains("pt"); + // filter |= metadata.target().contains("libpt"); // // // if it's another crate, only show above debug // filter |= metadata.level() > &Level::DEBUG; diff --git a/members/pt-math/Cargo.toml b/members/libpt-math/Cargo.toml similarity index 95% rename from members/pt-math/Cargo.toml rename to members/libpt-math/Cargo.toml index e9631ed..343800c 100644 --- a/members/pt-math/Cargo.toml +++ b/members/libpt-math/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-math" +name = "libpt-math" publish.workspace = true version.workspace = true edition.workspace = true diff --git a/members/pt-math/src/lib.rs b/members/libpt-math/src/lib.rs similarity index 100% rename from members/pt-math/src/lib.rs rename to members/libpt-math/src/lib.rs diff --git a/members/pt-net/Cargo.toml b/members/libpt-net/Cargo.toml similarity index 74% rename from members/pt-net/Cargo.toml rename to members/libpt-net/Cargo.toml index 801e0ab..397e696 100644 --- a/members/pt-net/Cargo.toml +++ b/members/libpt-net/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-net" +name = "libpt-net" publish.workspace = true version.workspace = true edition.workspace = true @@ -16,9 +16,9 @@ categories.workspace = true [dependencies] humantime = "2.1.0" -pt-core = { version = "0.1.0", path = "../pt-core" } -pt-log = { version = "0.1.0", path = "../pt-log" } -pt-math = { version = "0.1.0", path = "../pt-math" } +libpt-core = { version = "0.1.0", path = "../libpt-core" } +libpt-log = { version = "0.1.0", path = "../libpt-log" } +libpt-math = { version = "0.1.0", path = "../libpt-math" } reqwest = { version = "0.11.20", features = ["blocking"] } serde = { version = "1.0.188", features = ["serde_derive"] } serde_json = "1.0.107" diff --git a/members/pt-net/src/lib.rs b/members/libpt-net/src/lib.rs similarity index 100% rename from members/pt-net/src/lib.rs rename to members/libpt-net/src/lib.rs diff --git a/members/pt-net/src/monitoring/mod.rs b/members/libpt-net/src/monitoring/mod.rs similarity index 100% rename from members/pt-net/src/monitoring/mod.rs rename to members/libpt-net/src/monitoring/mod.rs diff --git a/members/pt-net/src/monitoring/uptime.rs b/members/libpt-net/src/monitoring/uptime.rs similarity index 99% rename from members/pt-net/src/monitoring/uptime.rs rename to members/libpt-net/src/monitoring/uptime.rs index 6302b99..8d3a9c4 100644 --- a/members/pt-net/src/monitoring/uptime.rs +++ b/members/libpt-net/src/monitoring/uptime.rs @@ -19,7 +19,7 @@ use std::{fmt, time::Duration}; //// IMPORTS /////////////////////////////////////////////////////////////////////////////////////// -use pt_log::*; +use libpt_log::*; use reqwest; @@ -29,7 +29,7 @@ use std::time::SystemTime; use serde::{Deserialize, Serialize}; use serde_json; -use pt_core::divider; +use libpt_core::divider; //// TYPES ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/members/pt-py/.github/workflows/CI.yml b/members/libpt-py/.github/workflows/CI.yml similarity index 100% rename from members/pt-py/.github/workflows/CI.yml rename to members/libpt-py/.github/workflows/CI.yml diff --git a/members/pt-py/.gitignore b/members/libpt-py/.gitignore similarity index 100% rename from members/pt-py/.gitignore rename to members/libpt-py/.gitignore diff --git a/members/pt-py/Cargo.toml b/members/libpt-py/Cargo.toml similarity index 82% rename from members/pt-py/Cargo.toml rename to members/libpt-py/Cargo.toml index bee9ea9..e8efa77 100644 --- a/members/pt-py/Cargo.toml +++ b/members/libpt-py/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pt-py" +name = "libpt-py" publish.workspace = true version.workspace = true edition.workspace = true @@ -14,9 +14,9 @@ categories.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "pt_py" +name = "libpt_py" crate-type = ["cdylib"] [dependencies] +libpt = { version = "0.1.7", path = "../..", features = ["all"] } pyo3 = { workspace = true } -libpt = { version = "0.1.7", path = "../../" } diff --git a/members/pt-py/LICENSE b/members/libpt-py/LICENSE similarity index 100% rename from members/pt-py/LICENSE rename to members/libpt-py/LICENSE diff --git a/members/pt-py/README.md b/members/libpt-py/README.md similarity index 100% rename from members/pt-py/README.md rename to members/libpt-py/README.md diff --git a/members/pt-py/pyproject.toml b/members/libpt-py/pyproject.toml similarity index 91% rename from members/pt-py/pyproject.toml rename to members/libpt-py/pyproject.toml index 177c9fc..4b4f3ee 100644 --- a/members/pt-py/pyproject.toml +++ b/members/libpt-py/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ ] [project.urls] -Homepage = "https://git.cscherr.de/PlexSheep/pt" +Homepage = "https://git.cscherr.de/PlexSheep/libpt" [tool.maturin] diff --git a/members/pt-py/python/libpt/__init__.py b/members/libpt-py/python/libpt/__init__.py similarity index 100% rename from members/pt-py/python/libpt/__init__.py rename to members/libpt-py/python/libpt/__init__.py diff --git a/members/pt-py/python/libpt/__init__.pyi b/members/libpt-py/python/libpt/__init__.pyi similarity index 100% rename from members/pt-py/python/libpt/__init__.pyi rename to members/libpt-py/python/libpt/__init__.pyi diff --git a/members/pt-py/python/libpt/common/__init__.pyi b/members/libpt-py/python/libpt/common/__init__.pyi similarity index 100% rename from members/pt-py/python/libpt/common/__init__.pyi rename to members/libpt-py/python/libpt/common/__init__.pyi diff --git a/members/pt-py/python/libpt/common/printing.pyi b/members/libpt-py/python/libpt/common/printing.pyi similarity index 100% rename from members/pt-py/python/libpt/common/printing.pyi rename to members/libpt-py/python/libpt/common/printing.pyi diff --git a/members/pt-py/python/libpt/logger.pyi b/members/libpt-py/python/libpt/logger.pyi similarity index 100% rename from members/pt-py/python/libpt/logger.pyi rename to members/libpt-py/python/libpt/logger.pyi diff --git a/members/pt-py/python/libpt/networking/__init__.pyi b/members/libpt-py/python/libpt/networking/__init__.pyi similarity index 100% rename from members/pt-py/python/libpt/networking/__init__.pyi rename to members/libpt-py/python/libpt/networking/__init__.pyi diff --git a/members/pt-py/python/libpt/networking/monitoring/__init__.pyi b/members/libpt-py/python/libpt/networking/monitoring/__init__.pyi similarity index 100% rename from members/pt-py/python/libpt/networking/monitoring/__init__.pyi rename to members/libpt-py/python/libpt/networking/monitoring/__init__.pyi diff --git a/members/pt-py/python/libpt/networking/monitoring/uptime.pyi b/members/libpt-py/python/libpt/networking/monitoring/uptime.pyi similarity index 100% rename from members/pt-py/python/libpt/networking/monitoring/uptime.pyi rename to members/libpt-py/python/libpt/networking/monitoring/uptime.pyi diff --git a/members/pt-py/python/libpt/py.typed b/members/libpt-py/python/libpt/py.typed similarity index 100% rename from members/pt-py/python/libpt/py.typed rename to members/libpt-py/python/libpt/py.typed diff --git a/members/pt-py/scripts/pytests.sh b/members/libpt-py/scripts/pytests.sh similarity index 100% rename from members/pt-py/scripts/pytests.sh rename to members/libpt-py/scripts/pytests.sh diff --git a/members/pt-py/src/lib.rs b/members/libpt-py/src/lib.rs similarity index 100% rename from members/pt-py/src/lib.rs rename to members/libpt-py/src/lib.rs diff --git a/src/lib.rs b/src/lib.rs index 01184c2..aab7b6e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,16 +7,16 @@ //! "main crate". Most crates will only show up if you activate their feature. #[cfg(feature = "core")] -pub use pt_core as core; +pub use libpt_core as core; #[cfg(feature = "bintols")] -pub use pt_bintols as bintols; +pub use libpt_bintols as bintols; #[cfg(feature = "hedu")] -pub use pt_hedu as hedu; +pub use libpt_hedu as hedu; #[cfg(feature = "log")] -pub use pt_log as log; +pub use libpt_log as log; #[cfg(feature = "math")] -pub use pt_math as math; +pub use libpt_math as math; #[cfg(feature = "net")] -pub use pt_net as net; +pub use libpt_net as net; #[cfg(feature = "ccc")] -pub use pt_ccc as ccc; +pub use libpt_ccc as ccc;