pnt-cli 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,185 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
10
+
11
+ [[package]]
12
+ name = "cfg-if"
13
+ version = "1.0.4"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
16
+
17
+ [[package]]
18
+ name = "heck"
19
+ version = "0.5.0"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
22
+
23
+ [[package]]
24
+ name = "indoc"
25
+ version = "2.0.7"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
28
+ dependencies = [
29
+ "rustversion",
30
+ ]
31
+
32
+ [[package]]
33
+ name = "libc"
34
+ version = "0.2.180"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+ checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
37
+
38
+ [[package]]
39
+ name = "memoffset"
40
+ version = "0.9.1"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
43
+ dependencies = [
44
+ "autocfg",
45
+ ]
46
+
47
+ [[package]]
48
+ name = "once_cell"
49
+ version = "1.21.3"
50
+ source = "registry+https://github.com/rust-lang/crates.io-index"
51
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
52
+
53
+ [[package]]
54
+ name = "pnt-cli-core"
55
+ version = "0.1.0"
56
+
57
+ [[package]]
58
+ name = "pnt-cli-py"
59
+ version = "0.1.0"
60
+ dependencies = [
61
+ "pnt-cli-core",
62
+ "pyo3",
63
+ ]
64
+
65
+ [[package]]
66
+ name = "portable-atomic"
67
+ version = "1.13.1"
68
+ source = "registry+https://github.com/rust-lang/crates.io-index"
69
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
70
+
71
+ [[package]]
72
+ name = "proc-macro2"
73
+ version = "1.0.106"
74
+ source = "registry+https://github.com/rust-lang/crates.io-index"
75
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
76
+ dependencies = [
77
+ "unicode-ident",
78
+ ]
79
+
80
+ [[package]]
81
+ name = "pyo3"
82
+ version = "0.23.5"
83
+ source = "registry+https://github.com/rust-lang/crates.io-index"
84
+ checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872"
85
+ dependencies = [
86
+ "cfg-if",
87
+ "indoc",
88
+ "libc",
89
+ "memoffset",
90
+ "once_cell",
91
+ "portable-atomic",
92
+ "pyo3-build-config",
93
+ "pyo3-ffi",
94
+ "pyo3-macros",
95
+ "unindent",
96
+ ]
97
+
98
+ [[package]]
99
+ name = "pyo3-build-config"
100
+ version = "0.23.5"
101
+ source = "registry+https://github.com/rust-lang/crates.io-index"
102
+ checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb"
103
+ dependencies = [
104
+ "once_cell",
105
+ "target-lexicon",
106
+ ]
107
+
108
+ [[package]]
109
+ name = "pyo3-ffi"
110
+ version = "0.23.5"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d"
113
+ dependencies = [
114
+ "libc",
115
+ "pyo3-build-config",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "pyo3-macros"
120
+ version = "0.23.5"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da"
123
+ dependencies = [
124
+ "proc-macro2",
125
+ "pyo3-macros-backend",
126
+ "quote",
127
+ "syn",
128
+ ]
129
+
130
+ [[package]]
131
+ name = "pyo3-macros-backend"
132
+ version = "0.23.5"
133
+ source = "registry+https://github.com/rust-lang/crates.io-index"
134
+ checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028"
135
+ dependencies = [
136
+ "heck",
137
+ "proc-macro2",
138
+ "pyo3-build-config",
139
+ "quote",
140
+ "syn",
141
+ ]
142
+
143
+ [[package]]
144
+ name = "quote"
145
+ version = "1.0.44"
146
+ source = "registry+https://github.com/rust-lang/crates.io-index"
147
+ checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
148
+ dependencies = [
149
+ "proc-macro2",
150
+ ]
151
+
152
+ [[package]]
153
+ name = "rustversion"
154
+ version = "1.0.22"
155
+ source = "registry+https://github.com/rust-lang/crates.io-index"
156
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
157
+
158
+ [[package]]
159
+ name = "syn"
160
+ version = "2.0.114"
161
+ source = "registry+https://github.com/rust-lang/crates.io-index"
162
+ checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
163
+ dependencies = [
164
+ "proc-macro2",
165
+ "quote",
166
+ "unicode-ident",
167
+ ]
168
+
169
+ [[package]]
170
+ name = "target-lexicon"
171
+ version = "0.12.16"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
174
+
175
+ [[package]]
176
+ name = "unicode-ident"
177
+ version = "1.0.22"
178
+ source = "registry+https://github.com/rust-lang/crates.io-index"
179
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
180
+
181
+ [[package]]
182
+ name = "unindent"
183
+ version = "0.2.4"
184
+ source = "registry+https://github.com/rust-lang/crates.io-index"
185
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,20 @@
1
+ [workspace]
2
+ resolver = "2"
3
+ members = ["crates/pnt-cli-py"]
4
+
5
+ [workspace.package]
6
+ version = "0.1.0"
7
+ edition = "2024"
8
+ license = "Apache-2.0"
9
+
10
+ [workspace.metadata.crane]
11
+ name = "pnt-cli"
12
+
13
+ [workspace.lints.rust]
14
+ unsafe_code = "forbid"
15
+ rust_2018_idioms = { level = "warn", priority = -1 }
16
+ unused_qualifications = "warn"
17
+
18
+ [workspace.lints.clippy]
19
+ panic = "warn"
20
+ unwrap_used = "warn"
pnt_cli-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,14 @@
1
+ Metadata-Version: 2.4
2
+ Name: pnt-cli
3
+ Version: 0.0.0
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: License :: OSI Approved :: Apache Software License
6
+ Classifier: Operating System :: OS Independent
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Rust
11
+ Summary: CLI package with Rust extension module via pyo3/maturin
12
+ Author-email: Your Name <your.email@example.com>
13
+ License: Apache-2.0
14
+ Requires-Python: >=3.11, <3.13
@@ -0,0 +1,12 @@
1
+ [package]
2
+ name = "pnt-cli-core"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+ license.workspace = true
6
+
7
+ [lib]
8
+ name = "pnt_cli_core"
9
+ path = "src/lib.rs"
10
+
11
+ [lints]
12
+ workspace = true
@@ -0,0 +1,24 @@
1
+ /// Greet a user by name.
2
+ pub fn greet(name: &str) -> String {
3
+ format!("Hello, {name}! (from Rust)")
4
+ }
5
+
6
+ /// Add two unsigned integers.
7
+ pub fn add(a: u64, b: u64) -> u64 {
8
+ a + b
9
+ }
10
+
11
+ #[cfg(test)]
12
+ mod tests {
13
+ use super::*;
14
+
15
+ #[test]
16
+ fn test_greet() {
17
+ assert_eq!(greet("world"), "Hello, world! (from Rust)");
18
+ }
19
+
20
+ #[test]
21
+ fn test_add() {
22
+ assert_eq!(add(2, 3), 5);
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+ [package]
2
+ name = "pnt-cli-py"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+ license.workspace = true
6
+
7
+ [lib]
8
+ name = "pnt_cli_native"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pnt-cli-core = { path = "../pnt-cli-core" }
13
+ pyo3 = { version = "0.23", features = ["extension-module"] }
14
+
15
+ [lints]
16
+ workspace = true
@@ -0,0 +1,21 @@
1
+ use pyo3::prelude::*;
2
+
3
+ /// Greet a user by name, returning a string from Rust.
4
+ #[pyfunction]
5
+ fn greet(name: &str) -> String {
6
+ pnt_cli_core::greet(name)
7
+ }
8
+
9
+ /// Add two unsigned integers.
10
+ #[pyfunction]
11
+ fn add(a: u64, b: u64) -> u64 {
12
+ pnt_cli_core::add(a, b)
13
+ }
14
+
15
+ /// Native extension module for pnt-cli.
16
+ #[pymodule(name = "_native")]
17
+ fn pnt_cli_native(m: &Bound<'_, PyModule>) -> PyResult<()> {
18
+ m.add_function(wrap_pyfunction!(greet, m)?)?;
19
+ m.add_function(wrap_pyfunction!(add, m)?)?;
20
+ Ok(())
21
+ }
@@ -0,0 +1,65 @@
1
+ [project]
2
+ authors = [
3
+ { name = "Your Name", email = "your.email@example.com" },
4
+ ]
5
+ classifiers = [
6
+ "Development Status :: 3 - Alpha",
7
+ "License :: OSI Approved :: Apache Software License",
8
+ "Operating System :: OS Independent",
9
+ "Programming Language :: Python :: 3",
10
+ "Programming Language :: Python :: 3.11",
11
+ "Programming Language :: Python :: 3.12",
12
+ "Programming Language :: Rust",
13
+ ]
14
+ dependencies = []
15
+ description = "CLI package with Rust extension module via pyo3/maturin"
16
+ license = { text = "Apache-2.0" }
17
+ name = "pnt-cli"
18
+ requires-python = ">=3.11,<3.13"
19
+ version = "0.0.0"
20
+
21
+ [project.scripts]
22
+ pnt-cli = "pnt_cli:main"
23
+
24
+ [build-system]
25
+ build-backend = "maturin"
26
+ requires = ["maturin>=1.5,<2.0"]
27
+
28
+ [tool.maturin]
29
+ features = ["pyo3/extension-module"]
30
+ manifest-path = "crates/pnt-cli-py/Cargo.toml"
31
+ module-name = "pnt_cli._native"
32
+ python-source = "src"
33
+
34
+ [tool.uv.sources]
35
+ pnt-functional = { path = "../pnt-functional", editable = true }
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ { include-group = "lint" },
40
+ { include-group = "test" },
41
+ { include-group = "types" },
42
+ ]
43
+ lint = [
44
+ "ruff>=0.9.4",
45
+ ]
46
+ test = [
47
+ "pytest>=8.3.4",
48
+ ]
49
+ types = [
50
+ "pyright>=1.1.395",
51
+ ]
52
+
53
+ [tool.uv]
54
+ default-groups = ["lint", "test", "types"]
55
+
56
+ [tool.pytest.ini_options]
57
+ addopts = """
58
+ -rA
59
+ --disable-warnings
60
+ --durations=0
61
+ """
62
+ log_level = "INFO"
63
+ testpaths = [
64
+ "tests",
65
+ ]
@@ -0,0 +1,18 @@
1
+ """pnt-cli: CLI package with Rust extension module."""
2
+
3
+ from pnt_cli._native import add, greet
4
+
5
+ __all__ = ["add", "greet"]
6
+
7
+
8
+ def main() -> None:
9
+ """CLI entrypoint exercising native pyo3 bindings."""
10
+ import sys
11
+
12
+ args = sys.argv[1:]
13
+ if args and args[0] == "add" and len(args) == 3:
14
+ result = add(int(args[1]), int(args[2]))
15
+ print(result)
16
+ else:
17
+ name = args[0] if args else "world"
18
+ print(greet(name))
@@ -0,0 +1,7 @@
1
+ def greet(name: str) -> str:
2
+ """Greet a user by name, returning a string from Rust."""
3
+ ...
4
+
5
+ def add(a: int, b: int) -> int:
6
+ """Add two unsigned integers."""
7
+ ...
File without changes