Repository navigation
Description
Description
PythonUvBuilder passes x86_64-unknown-linux-gnu or aarch64-unknown-linux-gnu to uv pip install for every Python runtime. These generic targets do not encode Lambda's runtime-specific manylinux compatibility.
On Windows with uv 0.11.26, I reproduced both:
python3.11: given wheels taggedmanylinux_2_17andmanylinux_2_28, the builder selects the latter. Lambda's AL2 runtime has glibc 2.26, so a wheel requiring 2.28 is incompatible.python3.12: given wheels taggedmanylinux_2_34andmanylinux_2_35, the builder fails to find a compatible wheel, even though Lambda's AL2023 runtime supports glibc 2.34. Usingx86_64-manylinux_2_34selects the correct wheel.
The same results reproduce for arm64. The fixtures below test wheel selection using valid wheel metadata; they do not require compiling or loading a native extension.
Steps to reproduce
Run with aws-lambda-builders 1.68.0 and uv installed. This example exercises the Python 3.12 failure using local wheels only:
import os
from pathlib import Path
from tempfile import TemporaryDirectory
from zipfile import ZipFile
from aws_lambda_builders.workflows.python_uv.packager import UvRunner
with TemporaryDirectory() as directory:
root = Path(directory)
wheels = root / "wheels"
wheels.mkdir()
for minor in (34, 35):
tag = f"py3-none-manylinux_2_{minor}_x86_64"
with ZipFile(wheels / f"platform_demo-1.0.0-{tag}.whl", "w") as wheel:
wheel.writestr("platform_demo.py", f"GLIBC_MINOR = {minor}\n")
wheel.writestr("platform_demo-1.0.0.dist-info/METADATA",
"Metadata-Version: 2.1\nName: platform-demo\nVersion: 1.0.0\n")
wheel.writestr("platform_demo-1.0.0.dist-info/WHEEL",
f"Wheel-Version: 1.0\nRoot-Is-Purelib: false\nTag: {tag}\n")
wheel.writestr("platform_demo-1.0.0.dist-info/RECORD", "")
manifest = root / "requirements.txt"
manifest.write_text("platform-demo==1.0.0\n", encoding="utf-8")
os.environ.update(UV_NO_INDEX="1", UV_OFFLINE="1", UV_FIND_LINKS=wheels.as_uri())
UvRunner().install_requirements(
str(manifest), str(root / "artifacts"),
python_version="3.12", platform="linux", architecture="x86_64",
)Observed result
UvInstallationError: ... platform-demo==1.0.0 has no wheels with a matching platform tag (e.g., manylinux_2_28_x86_64)
Expected result
Select the glibc 2.34 wheel for Python 3.12+, reject the 2.35 wheel, and use AL2-compatible targeting for Python 3.8-3.11. The selection should follow the Lambda runtime and architecture rather than generic GNU/Linux defaults.
AWS documents the glibc 2.26 / 2.34 runtime boundary. UV supports explicit manylinux targets.
Environment and related work
- Windows, Python 3.13.3, uv 0.11.26
- aws-lambda-builders 1.68.0, upstream commit
e3e14536501e38b0d6d8db582ddec6d0e0bd6f8a - Reproduced through
LambdaBuilder.build()for both architectures and both experimental-flag settings. - No support for Python packages that rely on manylinux wheels newer than
manylinux2014#700, feat: update the GLIBC version available for Python 3.12 and 3.13 #752, and feat: allow manylinux 2.28 and 2.34 on python 3.12+ when compiled on a different architecture #762 concernpython_pip; this report concerns the separatepython_uvcommand construction. I checked the open/closed issue and PR history for an existing UV fix.
Activity
vinsymoyya commentedon Nov 6, 2026
#956 fixes the runtime-dependent wheel selection by passing explicit manylinux targets for each Lambda runtime and architecture. AL2 uses the existing pip workflow's conservative manylinux2014 target; AL2023 uses manylinux 2.34.
The eight offline wheel-selection cases fail on unchanged upstream and pass with the fix on Linux and Windows. Fork validation passed all four OS/UV-version combinations: 1,025 unit/functional tests and 28 UV integration tests per job, plus lint, formatting, and coverage.