admina-core 0.9.0__tar.gz → 0.9.2__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.
- admina_core-0.9.2/.cargo/config.toml +33 -0
- {admina_core-0.9.0 → admina_core-0.9.2}/Cargo.lock +12 -11
- {admina_core-0.9.0 → admina_core-0.9.2}/Cargo.toml +8 -2
- {admina_core-0.9.0 → admina_core-0.9.2}/PKG-INFO +1 -1
- {admina_core-0.9.0 → admina_core-0.9.2}/pyproject.toml +1 -1
- {admina_core-0.9.0 → admina_core-0.9.2}/src/lib.rs +1 -1
- admina_core-0.9.0/.cargo/config.toml +0 -57
- {admina_core-0.9.0 → admina_core-0.9.2}/README.md +0 -0
- {admina_core-0.9.0 → admina_core-0.9.2}/src/firewall.rs +0 -0
- {admina_core-0.9.0 → admina_core-0.9.2}/src/forensic.rs +0 -0
- {admina_core-0.9.0 → admina_core-0.9.2}/src/loop_breaker.rs +0 -0
- {admina_core-0.9.0 → admina_core-0.9.2}/src/pii.rs +0 -0
- {admina_core-0.9.0 → admina_core-0.9.2}/uv.lock +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# macOS linker configuration for Python extension modules.
|
|
2
|
+
#
|
|
3
|
+
# WHY THIS FILE EXISTS
|
|
4
|
+
# ────────────────────
|
|
5
|
+
# When PyO3's `extension-module` feature is enabled, the resulting cdylib
|
|
6
|
+
# must NOT hard-link a specific libpython / Python.framework. Instead the
|
|
7
|
+
# Python symbols (PyInterpreterState_Get, PyDict_New, ...) should be
|
|
8
|
+
# resolved dynamically at load time against whichever Python interpreter
|
|
9
|
+
# actually loads the .so file.
|
|
10
|
+
#
|
|
11
|
+
# On macOS the magic incantation is `-undefined dynamic_lookup` passed to
|
|
12
|
+
# the linker. Without this flag, the linker pulls in whichever Python
|
|
13
|
+
# Framework happens to be available at build time (typically Homebrew's
|
|
14
|
+
# current `python@3.X` package) — even if maturin is told to build a
|
|
15
|
+
# wheel for a different Python version. The result is a wheel tagged
|
|
16
|
+
# `cp311` that actually contains a hard reference to a Python 3.14
|
|
17
|
+
# framework: importing it on Python 3.11 then aborts with
|
|
18
|
+
# "PyInterpreterState_Get: ... the GIL is released".
|
|
19
|
+
#
|
|
20
|
+
# `-undefined dynamic_lookup` removes the build-time Python framework
|
|
21
|
+
# reference entirely. The same .so then works against any Python 3.x
|
|
22
|
+
# that loads it (with abi3-py311+ guaranteeing source compatibility).
|
|
23
|
+
#
|
|
24
|
+
# Note: these settings apply to both `cargo build`/`cargo test` and to
|
|
25
|
+
# `maturin build`, since maturin invokes Cargo under the hood. The Linux
|
|
26
|
+
# `[target.*-unknown-linux-gnu]` build uses ELF rules and does not need
|
|
27
|
+
# this flag.
|
|
28
|
+
|
|
29
|
+
[target.aarch64-apple-darwin]
|
|
30
|
+
rustflags = ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]
|
|
31
|
+
|
|
32
|
+
[target.x86_64-apple-darwin]
|
|
33
|
+
rustflags = ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]
|
|
@@ -4,7 +4,7 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "admina_core"
|
|
7
|
-
version = "0.9.
|
|
7
|
+
version = "0.9.2"
|
|
8
8
|
dependencies = [
|
|
9
9
|
"chrono",
|
|
10
10
|
"hex",
|
|
@@ -254,10 +254,11 @@ dependencies = [
|
|
|
254
254
|
|
|
255
255
|
[[package]]
|
|
256
256
|
name = "pyo3"
|
|
257
|
-
version = "0.
|
|
257
|
+
version = "0.24.2"
|
|
258
258
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
259
|
-
checksum = "
|
|
259
|
+
checksum = "e5203598f366b11a02b13aa20cab591229ff0a89fd121a308a5df751d5fc9219"
|
|
260
260
|
dependencies = [
|
|
261
|
+
"cfg-if",
|
|
261
262
|
"indoc",
|
|
262
263
|
"libc",
|
|
263
264
|
"memoffset",
|
|
@@ -271,9 +272,9 @@ dependencies = [
|
|
|
271
272
|
|
|
272
273
|
[[package]]
|
|
273
274
|
name = "pyo3-build-config"
|
|
274
|
-
version = "0.
|
|
275
|
+
version = "0.24.2"
|
|
275
276
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
276
|
-
checksum = "
|
|
277
|
+
checksum = "99636d423fa2ca130fa5acde3059308006d46f98caac629418e53f7ebb1e9999"
|
|
277
278
|
dependencies = [
|
|
278
279
|
"once_cell",
|
|
279
280
|
"target-lexicon",
|
|
@@ -281,9 +282,9 @@ dependencies = [
|
|
|
281
282
|
|
|
282
283
|
[[package]]
|
|
283
284
|
name = "pyo3-ffi"
|
|
284
|
-
version = "0.
|
|
285
|
+
version = "0.24.2"
|
|
285
286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
286
|
-
checksum = "
|
|
287
|
+
checksum = "78f9cf92ba9c409279bc3305b5409d90db2d2c22392d443a87df3a1adad59e33"
|
|
287
288
|
dependencies = [
|
|
288
289
|
"libc",
|
|
289
290
|
"pyo3-build-config",
|
|
@@ -291,9 +292,9 @@ dependencies = [
|
|
|
291
292
|
|
|
292
293
|
[[package]]
|
|
293
294
|
name = "pyo3-macros"
|
|
294
|
-
version = "0.
|
|
295
|
+
version = "0.24.2"
|
|
295
296
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
296
|
-
checksum = "
|
|
297
|
+
checksum = "0b999cb1a6ce21f9a6b147dcf1be9ffedf02e0043aec74dc390f3007047cecd9"
|
|
297
298
|
dependencies = [
|
|
298
299
|
"proc-macro2",
|
|
299
300
|
"pyo3-macros-backend",
|
|
@@ -303,9 +304,9 @@ dependencies = [
|
|
|
303
304
|
|
|
304
305
|
[[package]]
|
|
305
306
|
name = "pyo3-macros-backend"
|
|
306
|
-
version = "0.
|
|
307
|
+
version = "0.24.2"
|
|
307
308
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
308
|
-
checksum = "
|
|
309
|
+
checksum = "822ece1c7e1012745607d5cf0bcb2874769f0f7cb34c4cde03b9358eb9ef911a"
|
|
309
310
|
dependencies = [
|
|
310
311
|
"heck",
|
|
311
312
|
"proc-macro2",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
[package]
|
|
17
17
|
name = "admina_core"
|
|
18
|
-
version = "0.9.
|
|
18
|
+
version = "0.9.2"
|
|
19
19
|
edition = "2021"
|
|
20
20
|
description = "Admina governance engines — Rust core with Python bindings"
|
|
21
21
|
license = "Apache-2.0"
|
|
@@ -26,7 +26,13 @@ name = "admina_core"
|
|
|
26
26
|
crate-type = ["cdylib", "rlib"]
|
|
27
27
|
|
|
28
28
|
[dependencies]
|
|
29
|
-
|
|
29
|
+
# abi3-py311 builds a single Stable-ABI wheel that works on Python 3.11+
|
|
30
|
+
# (no per-version build needed). Critically, it also prevents PyO3 from
|
|
31
|
+
# hard-linking a specific libpython at build time, which on macOS was
|
|
32
|
+
# pulling in whichever Python framework the build environment had (e.g.
|
|
33
|
+
# Homebrew Python 3.14), causing a Fatal Python error at import time on
|
|
34
|
+
# Python 3.11/3.12 runtimes.
|
|
35
|
+
pyo3 = { version = "0.24", features = ["extension-module", "abi3-py311"] }
|
|
30
36
|
regex = "1.10"
|
|
31
37
|
sha2 = "0.10"
|
|
32
38
|
hex = "0.4"
|
|
@@ -19,7 +19,7 @@ build-backend = "maturin"
|
|
|
19
19
|
|
|
20
20
|
[project]
|
|
21
21
|
name = "admina-core"
|
|
22
|
-
version = "0.9.
|
|
22
|
+
version = "0.9.2"
|
|
23
23
|
description = "Admina governance engines — Rust core with Python bindings (firewall, PII, loop breaker, hash chain)"
|
|
24
24
|
readme = "README.md"
|
|
25
25
|
requires-python = ">=3.11"
|
|
@@ -40,7 +40,7 @@ fn engine_info() -> PyResult<PyObject> {
|
|
|
40
40
|
|
|
41
41
|
/// Admina Core Python module.
|
|
42
42
|
#[pymodule]
|
|
43
|
-
fn admina_core(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
43
|
+
fn admina_core(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
44
44
|
m.add_function(wrap_pyfunction!(version, m)?)?;
|
|
45
45
|
m.add_function(wrap_pyfunction!(engine_info, m)?)?;
|
|
46
46
|
m.add_class::<firewall::RustFirewall>()?;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# macOS Framework Python — linker configuration
|
|
2
|
-
#
|
|
3
|
-
# WHEN THIS FILE IS NEEDED
|
|
4
|
-
# ────────────────────────
|
|
5
|
-
# Only when you run `cargo test` (full binary link) on macOS with a
|
|
6
|
-
# Framework-style Python installation (Homebrew, python.org installer).
|
|
7
|
-
# The CONTRIBUTING.md guide uses `cargo test --lib`, which builds against
|
|
8
|
-
# the `rlib` crate type and does NOT need to link libpython — so most
|
|
9
|
-
# contributors never need to touch this file.
|
|
10
|
-
#
|
|
11
|
-
# WHAT THIS FILE DOES
|
|
12
|
-
# ───────────────────
|
|
13
|
-
# Homebrew Python does not install a standalone `libpython3.x.dylib`.
|
|
14
|
-
# Instead it ships a `.framework` bundle. The Apple linker finds it via
|
|
15
|
-
# `-F <framework-search-dir> -framework Python`.
|
|
16
|
-
#
|
|
17
|
-
# HOW TO USE IT
|
|
18
|
-
# ─────────────
|
|
19
|
-
# 1. Identify your Python install path:
|
|
20
|
-
# python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"
|
|
21
|
-
# Example output: /opt/homebrew/opt/python@3.14/Frameworks/Python.framework/Versions/3.14/lib
|
|
22
|
-
#
|
|
23
|
-
# 2. Set the framework search directory (the path BEFORE "Python.framework"):
|
|
24
|
-
# E.g. /opt/homebrew/opt/python@3.14/Frameworks
|
|
25
|
-
# /opt/homebrew/opt/python@3.13/Frameworks
|
|
26
|
-
# /opt/homebrew/opt/python@3.11/Frameworks
|
|
27
|
-
#
|
|
28
|
-
# 3. Update the -F flag below to match, then run:
|
|
29
|
-
# PYO3_PYTHON=python3 cargo test
|
|
30
|
-
#
|
|
31
|
-
# ALTERNATIVE (no config needed)
|
|
32
|
-
# ───────────────────────────────
|
|
33
|
-
# Use a uv-managed Python, which DOES expose a shared library:
|
|
34
|
-
# PYO3_PYTHON=$(uv python find 3.11) cargo test --lib
|
|
35
|
-
# This is what CI does. It works on macOS and Linux without any flags.
|
|
36
|
-
#
|
|
37
|
-
# NOTE FOR LINUX
|
|
38
|
-
# ──────────────
|
|
39
|
-
# The [target.*-apple-darwin] sections below are ignored on Linux entirely.
|
|
40
|
-
# Linux cargo test works out of the box:
|
|
41
|
-
# PYO3_PYTHON=$(uv python find 3.11) cargo test --lib
|
|
42
|
-
|
|
43
|
-
[target.aarch64-apple-darwin]
|
|
44
|
-
# Update python@3.14 to match your installed Homebrew Python version.
|
|
45
|
-
rustflags = [
|
|
46
|
-
"-C", "link-arg=-F/opt/homebrew/opt/python@3.14/Frameworks",
|
|
47
|
-
"-C", "link-arg=-framework",
|
|
48
|
-
"-C", "link-arg=Python",
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
[target.x86_64-apple-darwin]
|
|
52
|
-
# Update python@3.14 to match your installed Homebrew Python version.
|
|
53
|
-
rustflags = [
|
|
54
|
-
"-C", "link-arg=-F/opt/homebrew/opt/python@3.14/Frameworks",
|
|
55
|
-
"-C", "link-arg=-framework",
|
|
56
|
-
"-C", "link-arg=Python",
|
|
57
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|