From 9294fba86d59ef243ccc63ae26ddb8a785ca12c4 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 23 Dec 2025 19:20:17 +0000 Subject: [PATCH] Make manylinux wheels. --- pyproject.toml | 1 + tools/release.py | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4360274..f405a04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ Repository = "https://github.com/LeoVasanko/aegis-python" [dependency-groups] dev = [ + "auditwheel>=6.5.0", "pytest>=8.4.2", "ruff>=0.14.4", "setuptools>=80.9.0", diff --git a/tools/release.py b/tools/release.py index 75d5888..1fa6017 100644 --- a/tools/release.py +++ b/tools/release.py @@ -211,6 +211,43 @@ def main(): wheel = wheels[0] + # Repair wheel with auditwheel for manylinux compatibility + repair_cmd = [ + "uv", + "run", + "auditwheel", + "repair", + str(wheel), + "-w", + str(dist_dir), + ] + if not run_command( + repair_cmd, f"Repairing wheel for Python {py_version} with auditwheel" + ): + print( + f"✗ Auditwheel repair failed for Python {py_version}", file=sys.stderr + ) + failed_builds.append(py_version) + continue + + # Find the repaired wheel (it will have a different name) + all_wheels = list(dist_dir.glob(f"aeg-*-cp{py_version.replace('.', '')}-*.whl")) + repaired_wheels = [w for w in all_wheels if "linux_x86_64" not in str(w)] + if not repaired_wheels: + print( + f"✗ Could not find repaired (manylinux) wheel for Python {py_version}", + file=sys.stderr, + ) + failed_builds.append(py_version) + continue + + wheel = repaired_wheels[0] # Use the repaired wheel for testing + + # Remove the unrepaired linux_x86_64 wheels + for w in all_wheels: + if "linux_x86_64" in str(w): + w.unlink() + # Test the wheel with pytest (use --isolated to avoid .venv conflicts) test_cmd = [ "uv",