Require Python 3.12+; drop PyPy and 3.10/3.11 wheel builds
- requires-python >= 3.12; abi3 limited API tag cp310 -> cp312 - util.Buffer now imported directly from collections.abc (no fallback) - release.py: ABI3 wheel covers 3.12-3.15; PyPy wheels dropped (PyPy has no 3.12 support yet)
This commit is contained in:
1 parent
199dfe7bd9
commit
972c3053d9
4 files changed
+7
-21
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ name = "aeg"
|
||||
dynamic = ["version"]
|
||||
description = "AEGIS encryption easy to use Python binding. Wheels for major platforms."
|
||||
readme = {file = "README.md", content-type = "text/markdown"}
|
||||
requires-python = ">=3.10"
|
||||
requires-python = ">=3.12"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
|
||||
@@ -37,6 +37,6 @@ if __name__ == "__main__":
|
||||
setup(
|
||||
cffi_modules=["setup.py:ffibuilder"],
|
||||
options=(
|
||||
{"bdist_wheel": {"py_limited_api": "cp310"}} if not is_free_threaded else {}
|
||||
{"bdist_wheel": {"py_limited_api": "cp312"}} if not is_free_threaded else {}
|
||||
),
|
||||
)
|
||||
+1
-8
@@ -4,19 +4,12 @@ Currently provides Python-side aligned allocation helpers that avoid relying
|
||||
on libc/posix_memalign. Memory is owned by Python; C code only borrows it.
|
||||
"""
|
||||
|
||||
from typing import Protocol
|
||||
from collections.abc import Buffer
|
||||
|
||||
from ._loader import ffi
|
||||
|
||||
__all__ = ["new_aligned_struct", "aligned_address", "Buffer", "nonce_increment", "wipe"]
|
||||
|
||||
try:
|
||||
from collections.abc import Buffer # type: ignore
|
||||
except ImportError:
|
||||
# Fallback for Python < 3.12
|
||||
class Buffer(Protocol):
|
||||
def __buffer__(self, flags: int) -> memoryview: ...
|
||||
|
||||
|
||||
def aligned_address(obj) -> int:
|
||||
"""Return the integer address of the start of a cffi array object."""
|
||||
|
||||
+4
-11
@@ -23,20 +23,16 @@ ABI3_BUILD_VERSION = "3.14+gil"
|
||||
|
||||
# All GIL-enabled Python versions covered by the ABI3 wheel
|
||||
ABI3_COVERED_VERSIONS = [
|
||||
"3.10",
|
||||
"3.11",
|
||||
"3.12",
|
||||
"3.13+gil",
|
||||
"3.14+gil",
|
||||
"3.15+gil",
|
||||
]
|
||||
|
||||
# Non-ABI3 wheels: each needs its own build (free-threaded and PyPy)
|
||||
# Non-ABI3 wheels: each needs its own build (free-threaded)
|
||||
NON_ABI3_VERSIONS = [
|
||||
"3.14t",
|
||||
"3.15t",
|
||||
"pypy3.10",
|
||||
"pypy3.11",
|
||||
]
|
||||
|
||||
# All versions for testing and benchmarking
|
||||
@@ -159,12 +155,9 @@ def normalize_line_endings(repo_root: Path):
|
||||
def get_wheel_pattern(py_version: str, abi3: bool = False) -> str:
|
||||
"""Get the glob pattern for finding a wheel file."""
|
||||
if abi3:
|
||||
# ABI3 wheels always use cp310-abi3 tag (minimum supported version)
|
||||
# ABI3 wheels always use cp312-abi3 tag (minimum supported version)
|
||||
# regardless of which Python version was used to build
|
||||
return "aeg-*-cp310-abi3-*.whl"
|
||||
elif py_version.startswith("pypy"):
|
||||
# PyPy wheels use pp3XX format
|
||||
return f"aeg-*-pp{py_version.replace('pypy', '').replace('.', '')}-*.whl"
|
||||
return "aeg-*-cp312-abi3-*.whl"
|
||||
elif py_version.endswith("t"):
|
||||
# Free-threaded Python wheels use cpXXX-cpXXXt format (e.g., cp314-cp314t)
|
||||
base_version = py_version.replace(".", "").replace("t", "")
|
||||
@@ -183,7 +176,7 @@ def build_abi3_wheel(dist_dir: Path, py_version: str) -> Path | None:
|
||||
if not run_command(cmd, env=get_build_env()):
|
||||
return None
|
||||
|
||||
# Find the ABI3 wheel (always tagged cp310-abi3 regardless of build Python version)
|
||||
# Find the ABI3 wheel (always tagged cp312-abi3 regardless of build Python version)
|
||||
wheel_pattern = get_wheel_pattern(py_version, abi3=True)
|
||||
wheels = list(dist_dir.glob(wheel_pattern))
|
||||
if not wheels:
|
||||
|
||||
Reference in new issue
Block a user