nox-prism 2.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,5 @@
1
+ Metadata-Version: 2.1
2
+ Name: nox-prism
3
+ Version: 2.0.0
4
+ Summary: Native Python bindings (CPython 3.15+ abi3t, free-threaded) for Prism color & image codec utilities
5
+ Requires-Python: >=3.15
@@ -0,0 +1,12 @@
1
+ # nox-prism
2
+
3
+ Native Python (`CPython 3.15+` `abi3t`, free-threaded `3.15t`) bindings for [prism](https://github.com/mburakmmm/prism).
4
+
5
+ ```python
6
+ import nox_prism
7
+
8
+ assert nox_prism.clamp_u8(300) == 255
9
+ lin = nox_prism.srgb_to_linear_channel(128)
10
+ comp = nox_prism.gif_lzw_compress([0, 1, 2, 0, 1, 2], 2)
11
+ assert nox_prism.gif_lzw_decompress(comp, 2, 6) == [0, 1, 2, 0, 1, 2]
12
+ ```
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "nox_prism_bridge",
3
+ "version": "2.0.0",
4
+ "source": "nox",
5
+ "entry": "src/lib.nox",
6
+ "requires": [
7
+ {
8
+ "alias": "prism",
9
+ "repo": "https://github.com/mburakmmm/prism.git",
10
+ "ref": "33aef355afa7393f03ceb6987eba59c6ed977c4b",
11
+ "require_signed_commit": false
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["noxpy>=0.7.0a2"]
3
+ build-backend = "noxpy.build"
4
+
5
+ [project]
6
+ name = "nox-prism"
7
+ version = "2.0.0"
8
+ description = "Native Python bindings (CPython 3.15+ abi3t, free-threaded) for Prism color & image codec utilities"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.15"
12
+
13
+ [tool.noxpy]
14
+ module-name = "nox_prism"
15
+ source = "src/lib.nox"
16
+ backend = "llvm"
17
+ abi = "abi3t"
18
+ free-threaded = true
19
+ generate-stubs = true
20
+ export = "public"
21
+
22
+ [tool.noxpy.publish]
23
+ enabled = true
24
+ repository = "pypi"
25
+ trigger = "release-tag"
26
+ include-sdist = true
27
+ require-attestation = true
@@ -0,0 +1,29 @@
1
+ # Auto-generated by `noxpy init --from-nox-package` targeting unmodified `prism` (33aef355afa7393f03ceb6987eba59c6ed977c4b).
2
+
3
+ import prism.codecs.gif
4
+ import prism.codecs.png
5
+ import prism.core.color
6
+
7
+ @export
8
+ def gif_lzw_decompress(compressed: list[int], min_code_size: int, expected_pixels: int) -> list[int]:
9
+ return prism.codecs.gif.gif_lzw_decompress(compressed, min_code_size, expected_pixels)
10
+
11
+ @export
12
+ def gif_lzw_compress(indices: list[int], min_code_size: int) -> list[int]:
13
+ return prism.codecs.gif.gif_lzw_compress(indices, min_code_size)
14
+
15
+ @export
16
+ def paeth_predictor(a: int, b: int, c: int) -> int:
17
+ return prism.codecs.png.paeth_predictor(a, b, c)
18
+
19
+ @export
20
+ def clamp_u8(val: int) -> int:
21
+ return prism.core.color.clamp_u8(val)
22
+
23
+ @export
24
+ def srgb_to_linear_channel(c_u8: int) -> float:
25
+ return prism.core.color.srgb_to_linear_channel(c_u8)
26
+
27
+ @export
28
+ def linear_to_srgb_channel(lin: float) -> int:
29
+ return prism.core.color.linear_to_srgb_channel(lin)