rns-engine 0.4.0__tar.gz → 0.4.1__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.
@@ -1,30 +1,41 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rns_engine
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Exact RNS engine with session/cache API.
5
5
  Author: Evan Wesley
6
- License: AGPL-3.0-only
6
+ License-Expression: AGPL-3.0-only
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
9
13
  Classifier: Programming Language :: C++
10
14
  Classifier: Operating System :: OS Independent
11
15
  Requires-Python: >=3.10
12
16
  Description-Content-Type: text/markdown
13
17
  License-File: LICENSE
14
- Requires-Dist: numpy
18
+ Requires-Dist: numpy>=1.23
19
+ Provides-Extra: test
20
+ Requires-Dist: pytest; extra == "test"
21
+ Requires-Dist: numpy==2.2.6; extra == "test"
15
22
  Dynamic: license-file
16
23
 
17
24
  # rns_engine
18
25
 
19
- **Exact 4-rail integer arithmetic via a Residue Number System (RNS), with AVX2 and optional OpenMP acceleration.**
26
+
27
+
28
+ **Extremely fast and Exact integer arithmetic on a 2 core cpu**
20
29
 
21
30
  No floating point. No approximation. Exact results modulo the engine's dynamic range.
22
31
 
32
+
33
+ Link to recent benchmark on Colab: https://colab.research.google.com/drive/18RIQSLf4Vf5xUnwEmDwYNPJDLSM_Stqa?usp=sharing
23
34
  ---
24
35
 
25
36
  ## What it does
26
37
 
27
- Standard Python integers are exact but slow. NumPy arrays are fast, but fixed-width integer arithmetic can overflow and float-based pipelines drift. `rns_engine` gives you **exact modular arithmetic within a fixed dynamic range** by decomposing values across four coprime rails:
38
+ Standard Python integers are exact but slow. NumPy arrays are fast, but fixed-width integer arithmetic can overflow and float-based pipelines drift. `rns_engine` gives you ** extremely fast and exact modular arithmetic within a fixed dynamic range** by decomposing values across four coprime rails:
28
39
 
29
40
  - `127`
30
41
  - `8191`
@@ -240,8 +251,7 @@ Workload: `affine_repeat_u64_io(x, 1_000_003, 7, iterations=1000)`
240
251
  ### Verification status
241
252
 
242
253
  * correctness sanity checks passed
243
- * built wheel installed and executed successfully
244
- * full test suite passed: **49 / 49**
254
+ * full test suite passed: **50 / 50**
245
255
 
246
256
  ---
247
257
 
@@ -285,10 +295,11 @@ pytest tests/ -v
285
295
 
286
296
  Requirements:
287
297
 
288
- * Python 3.10+
298
+ * Python 3.10–3.13
289
299
  * C++17 compiler
290
- * NumPy
291
- * pybind11
300
+ * An internet-accessible Python package index containing the build dependencies
301
+
302
+ `pip` installs NumPy and pybind11 automatically from `pyproject.toml`. In an offline or restricted environment, those packages must already be available on the configured package index or installed locally before building.
292
303
 
293
304
  ---
294
305
 
@@ -310,8 +321,9 @@ rns.HAS_AVX2
310
321
 
311
322
  ## Current release
312
323
 
313
- ### v0.4.0rc1
324
+ ### v0.4.1
314
325
 
326
+ * Maintenance release: repaired packaging metadata, cross-platform wheel builds, and Python 3.10–3.13 CI; arithmetic core unchanged
315
327
  * 4-rail engine (`127 × 8191 × 65536 × 524287`)
316
328
  * AVX2-accelerated encoded kernels
317
329
  * fused `fma(...)`
@@ -324,6 +336,10 @@ rns.HAS_AVX2
324
336
  ---
325
337
 
326
338
  ## License
339
+ ** This is licensed under AGPLv3. If you use it in a network service, you must make your modified source available to users.
340
+ Commercial Licensing
341
+ If you need to use this software in a proprietary or closed-source product, commercial licenses are available. This allows you to bypass the AGPL requirements. For inquiries, please contact: ewesley541@gmail.com**
342
+
327
343
 
328
344
  **AGPL-3.0-only**
329
345
  Copyright 2026 Evan Wesley
@@ -1,30 +1,18 @@
1
- Metadata-Version: 2.4
2
- Name: rns_engine
3
- Version: 0.4.0
4
- Summary: Exact RNS engine with session/cache API.
5
- Author: Evan Wesley
6
- License: AGPL-3.0-only
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3 :: Only
9
- Classifier: Programming Language :: C++
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.10
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: numpy
15
- Dynamic: license-file
16
-
17
1
  # rns_engine
18
2
 
19
- **Exact 4-rail integer arithmetic via a Residue Number System (RNS), with AVX2 and optional OpenMP acceleration.**
3
+
4
+
5
+ **Extremely fast and Exact integer arithmetic on a 2 core cpu**
20
6
 
21
7
  No floating point. No approximation. Exact results modulo the engine's dynamic range.
22
8
 
9
+
10
+ Link to recent benchmark on Colab: https://colab.research.google.com/drive/18RIQSLf4Vf5xUnwEmDwYNPJDLSM_Stqa?usp=sharing
23
11
  ---
24
12
 
25
13
  ## What it does
26
14
 
27
- Standard Python integers are exact but slow. NumPy arrays are fast, but fixed-width integer arithmetic can overflow and float-based pipelines drift. `rns_engine` gives you **exact modular arithmetic within a fixed dynamic range** by decomposing values across four coprime rails:
15
+ Standard Python integers are exact but slow. NumPy arrays are fast, but fixed-width integer arithmetic can overflow and float-based pipelines drift. `rns_engine` gives you ** extremely fast and exact modular arithmetic within a fixed dynamic range** by decomposing values across four coprime rails:
28
16
 
29
17
  - `127`
30
18
  - `8191`
@@ -240,8 +228,7 @@ Workload: `affine_repeat_u64_io(x, 1_000_003, 7, iterations=1000)`
240
228
  ### Verification status
241
229
 
242
230
  * correctness sanity checks passed
243
- * built wheel installed and executed successfully
244
- * full test suite passed: **49 / 49**
231
+ * full test suite passed: **50 / 50**
245
232
 
246
233
  ---
247
234
 
@@ -285,10 +272,11 @@ pytest tests/ -v
285
272
 
286
273
  Requirements:
287
274
 
288
- * Python 3.10+
275
+ * Python 3.10–3.13
289
276
  * C++17 compiler
290
- * NumPy
291
- * pybind11
277
+ * An internet-accessible Python package index containing the build dependencies
278
+
279
+ `pip` installs NumPy and pybind11 automatically from `pyproject.toml`. In an offline or restricted environment, those packages must already be available on the configured package index or installed locally before building.
292
280
 
293
281
  ---
294
282
 
@@ -310,8 +298,9 @@ rns.HAS_AVX2
310
298
 
311
299
  ## Current release
312
300
 
313
- ### v0.4.0rc1
301
+ ### v0.4.1
314
302
 
303
+ * Maintenance release: repaired packaging metadata, cross-platform wheel builds, and Python 3.10–3.13 CI; arithmetic core unchanged
315
304
  * 4-rail engine (`127 × 8191 × 65536 × 524287`)
316
305
  * AVX2-accelerated encoded kernels
317
306
  * fused `fma(...)`
@@ -324,6 +313,10 @@ rns.HAS_AVX2
324
313
  ---
325
314
 
326
315
  ## License
316
+ ** This is licensed under AGPLv3. If you use it in a network service, you must make your modified source available to users.
317
+ Commercial Licensing
318
+ If you need to use this software in a proprietary or closed-source product, commercial licenses are available. This allows you to bypass the AGPL requirements. For inquiries, please contact: ewesley541@gmail.com**
319
+
327
320
 
328
321
  **AGPL-3.0-only**
329
322
  Copyright 2026 Evan Wesley
@@ -1,25 +1,33 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61", "wheel", "pybind11", "numpy"]
2
+ requires = ["setuptools>=77", "wheel", "packaging>=24.2", "pybind11>=2.13", "numpy==2.2.6"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rns_engine"
7
- version = "0.4.0"
7
+ version = "0.4.1"
8
8
  description = "Exact RNS engine with session/cache API."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  authors = [
12
12
  { name = "Evan Wesley" }
13
13
  ]
14
- license = {text = "AGPL-3.0-only"}
15
- dependencies = ["numpy"]
14
+ license = "AGPL-3.0-only"
15
+ license-files = ["LICENSE"]
16
+ dependencies = ["numpy>=1.23"]
16
17
  classifiers = [
17
18
  "Programming Language :: Python :: 3",
18
19
  "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
19
24
  "Programming Language :: C++",
20
25
  "Operating System :: OS Independent",
21
26
  ]
22
27
 
28
+ [project.optional-dependencies]
29
+ test = ["pytest", "numpy==2.2.6"]
30
+
23
31
  [tool.setuptools]
24
32
  package-dir = {"" = "src"}
25
33
  include-package-data = true
@@ -29,16 +37,19 @@ where = ["src"]
29
37
  include = ["rns_engine", "rns_engine.*"]
30
38
 
31
39
  [tool.cibuildwheel]
32
- build = ["cp310-*", "cp311-*", "cp312-*"]
40
+ build = ["cp310-*", "cp311-*", "cp312-*", "cp313-*"]
33
41
  skip = ["pp*", "*-musllinux*"]
42
+ dependency-versions = "latest"
43
+ test-extras = ["test"]
44
+ test-command = "python -m pytest {project}/tests -v"
34
45
 
35
46
  [tool.cibuildwheel.macos]
36
47
  archs = ["x86_64", "arm64"]
37
48
  environment = {MACOSX_DEPLOYMENT_TARGET = "11.0"}
38
- before-all = "brew install libomp || true"
39
49
 
40
50
  [tool.cibuildwheel.linux]
41
51
  archs = ["x86_64"]
52
+ environment = {PIP_ONLY_BINARY = "numpy"}
42
53
 
43
54
  [tool.cibuildwheel.windows]
44
55
  archs = ["AMD64"]
@@ -1,8 +1,9 @@
1
1
  import os
2
2
  import platform
3
- from setuptools import setup, Extension, find_packages
4
- import pybind11
3
+
5
4
  import numpy as np
5
+ import pybind11
6
+ from setuptools import Extension, setup
6
7
 
7
8
 
8
9
  def get_compile_args():
@@ -24,9 +25,8 @@ def get_compile_args():
24
25
  if system == "Linux":
25
26
  args += ["-fopenmp"]
26
27
 
27
- # macOS: no OpenMP — avoids delocate arch mismatch on arm64 wheels
28
- # The cpp has #ifdef _OPENMP guards, scalar fallbacks work correctly
29
-
28
+ # macOS intentionally uses the scalar fallback instead of OpenMP so the
29
+ # arm64 and x86_64 wheels do not gain an external libomp dependency.
30
30
  if machine in ("x86_64", "amd64"):
31
31
  args += ["-mavx2", "-funroll-loops", "-DFORCE_AVX2"]
32
32
 
@@ -34,11 +34,8 @@ def get_compile_args():
34
34
 
35
35
 
36
36
  def get_link_args():
37
- system = platform.system()
38
-
39
- if system == "Linux":
37
+ if platform.system() == "Linux":
40
38
  return ["-fopenmp"]
41
-
42
39
  return []
43
40
 
44
41
 
@@ -51,11 +48,9 @@ ext = Extension(
51
48
  language="c++",
52
49
  )
53
50
 
51
+ # Project metadata and package discovery live in pyproject.toml. Keeping them
52
+ # out of setup.py prevents the two build entry points from drifting apart.
54
53
  setup(
55
- name="rns_engine",
56
- version="0.4.0",
57
- package_dir={"": "src"},
58
- packages=find_packages("src"),
59
54
  ext_modules=[ext],
60
55
  include_package_data=True,
61
56
  zip_safe=False,
@@ -1,3 +1,5 @@
1
+ from importlib.metadata import PackageNotFoundError, version as _distribution_version
2
+
1
3
  from ._core import (
2
4
  HAS_AVX2,
3
5
  M,
@@ -38,7 +40,12 @@ from ._core import (
38
40
  )
39
41
  from .engine import EncodedArray, Session, SessionCache
40
42
 
41
- __version__ = "0.4.0rc1"
43
+ try:
44
+ __version__ = _distribution_version("rns_engine")
45
+ except PackageNotFoundError:
46
+ # This only occurs when importing directly from an unpacked source tree
47
+ # rather than from an installed wheel/editable build.
48
+ __version__ = "0+unknown"
42
49
 
43
50
  __all__ = [
44
51
  "HAS_AVX2",
@@ -1,14 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: rns_engine
3
+ Version: 0.4.1
4
+ Summary: Exact RNS engine with session/cache API.
5
+ Author: Evan Wesley
6
+ License-Expression: AGPL-3.0-only
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: C++
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: numpy>=1.23
19
+ Provides-Extra: test
20
+ Requires-Dist: pytest; extra == "test"
21
+ Requires-Dist: numpy==2.2.6; extra == "test"
22
+ Dynamic: license-file
23
+
1
24
  # rns_engine
2
25
 
3
- **Exact 4-rail integer arithmetic via a Residue Number System (RNS), with AVX2 and optional OpenMP acceleration.**
26
+
27
+
28
+ **Extremely fast and Exact integer arithmetic on a 2 core cpu**
4
29
 
5
30
  No floating point. No approximation. Exact results modulo the engine's dynamic range.
6
31
 
32
+
33
+ Link to recent benchmark on Colab: https://colab.research.google.com/drive/18RIQSLf4Vf5xUnwEmDwYNPJDLSM_Stqa?usp=sharing
7
34
  ---
8
35
 
9
36
  ## What it does
10
37
 
11
- Standard Python integers are exact but slow. NumPy arrays are fast, but fixed-width integer arithmetic can overflow and float-based pipelines drift. `rns_engine` gives you **exact modular arithmetic within a fixed dynamic range** by decomposing values across four coprime rails:
38
+ Standard Python integers are exact but slow. NumPy arrays are fast, but fixed-width integer arithmetic can overflow and float-based pipelines drift. `rns_engine` gives you ** extremely fast and exact modular arithmetic within a fixed dynamic range** by decomposing values across four coprime rails:
12
39
 
13
40
  - `127`
14
41
  - `8191`
@@ -224,8 +251,7 @@ Workload: `affine_repeat_u64_io(x, 1_000_003, 7, iterations=1000)`
224
251
  ### Verification status
225
252
 
226
253
  * correctness sanity checks passed
227
- * built wheel installed and executed successfully
228
- * full test suite passed: **49 / 49**
254
+ * full test suite passed: **50 / 50**
229
255
 
230
256
  ---
231
257
 
@@ -269,10 +295,11 @@ pytest tests/ -v
269
295
 
270
296
  Requirements:
271
297
 
272
- * Python 3.10+
298
+ * Python 3.10–3.13
273
299
  * C++17 compiler
274
- * NumPy
275
- * pybind11
300
+ * An internet-accessible Python package index containing the build dependencies
301
+
302
+ `pip` installs NumPy and pybind11 automatically from `pyproject.toml`. In an offline or restricted environment, those packages must already be available on the configured package index or installed locally before building.
276
303
 
277
304
  ---
278
305
 
@@ -294,8 +321,9 @@ rns.HAS_AVX2
294
321
 
295
322
  ## Current release
296
323
 
297
- ### v0.4.0rc1
324
+ ### v0.4.1
298
325
 
326
+ * Maintenance release: repaired packaging metadata, cross-platform wheel builds, and Python 3.10–3.13 CI; arithmetic core unchanged
299
327
  * 4-rail engine (`127 × 8191 × 65536 × 524287`)
300
328
  * AVX2-accelerated encoded kernels
301
329
  * fused `fma(...)`
@@ -308,6 +336,10 @@ rns.HAS_AVX2
308
336
  ---
309
337
 
310
338
  ## License
339
+ ** This is licensed under AGPLv3. If you use it in a network service, you must make your modified source available to users.
340
+ Commercial Licensing
341
+ If you need to use this software in a proprietary or closed-source product, commercial licenses are available. This allows you to bypass the AGPL requirements. For inquiries, please contact: ewesley541@gmail.com**
342
+
311
343
 
312
344
  **AGPL-3.0-only**
313
345
  Copyright 2026 Evan Wesley
@@ -11,5 +11,6 @@ src/rns_engine.egg-info/dependency_links.txt
11
11
  src/rns_engine.egg-info/not-zip-safe
12
12
  src/rns_engine.egg-info/requires.txt
13
13
  src/rns_engine.egg-info/top_level.txt
14
+ tests/test_packaging.py
14
15
  tests/test_rns.py
15
16
  tests/test_session.py
@@ -0,0 +1,5 @@
1
+ numpy>=1.23
2
+
3
+ [test]
4
+ pytest
5
+ numpy==2.2.6
@@ -0,0 +1,8 @@
1
+ from importlib.metadata import version
2
+
3
+ import rns_engine
4
+
5
+
6
+ def test_runtime_version_matches_distribution_metadata():
7
+ assert rns_engine.__version__ == version("rns_engine")
8
+ assert rns_engine.__version__ != "0+unknown"
@@ -1 +0,0 @@
1
- numpy
File without changes
File without changes
File without changes