3 Commits
Author SHA1 Message Date
LeoVasanko d7acf7a315 [release script] Auditwheel only on Linux. 2025-12-23 19:38:59 +00:00
LeoVasanko 7f01de8327 Add README for PyPI. 2025-12-23 19:33:00 +00:00
LeoVasanko 9294fba86d Make manylinux wheels. 2025-12-23 19:20:17 +00:00
2 changed files with 47 additions and 2 deletions

No files matched your search

+2
View File
@@ -7,6 +7,7 @@ backend-path = ["tools"]
name = "aeg" name = "aeg"
dynamic = ["version"] dynamic = ["version"]
description = "AEGIS encryption easy to use Python binding. Wheels for major platforms." 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.10"
classifiers = [ classifiers = [
"Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: CPython",
@@ -23,6 +24,7 @@ Repository = "https://github.com/LeoVasanko/aegis-python"
[dependency-groups] [dependency-groups]
dev = [ dev = [
"auditwheel>=6.5.0",
"pytest>=8.4.2", "pytest>=8.4.2",
"ruff>=0.14.4", "ruff>=0.14.4",
"setuptools>=80.9.0", "setuptools>=80.9.0",
+45 -2
View File
@@ -1,11 +1,13 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Build wheels for all supported Python versions using uv.""" """Build wheels for all supported Python versions using uv."""
import platform
import shutil
import subprocess import subprocess
import sys import sys
import tomllib
from pathlib import Path from pathlib import Path
import shutil
import tomllib
from packaging.specifiers import SpecifierSet from packaging.specifiers import SpecifierSet
from packaging.version import Version from packaging.version import Version
@@ -211,6 +213,47 @@ def main():
wheel = wheels[0] wheel = wheels[0]
# Repair wheel with auditwheel for manylinux compatibility (Linux only)
if platform.system() == "Linux":
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 the wheel with pytest (use --isolated to avoid .venv conflicts)
test_cmd = [ test_cmd = [
"uv", "uv",