From f6d431df64984519e14d71fe5a03a5669192e7c2 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 14 Sep 2026 21:26:41 +0200 Subject: [PATCH] mlx: set PYPI_RELEASE=1 to avoid a dev version setup.py's get_version() only emits the clean tag version (e.g. 0.32.2) when PYPI_RELEASE=1; otherwise it always appends .devYYYYMMDD+, even when building from an exact, unpatched v0.32.2 checkout. Applies to both the mlx frontend and mlx-cpu backend packages, which share the same setup.py (published so far: 0.32.2.dev20260914+1f8e74e for both). --- .github/workflows/build-mlx.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-mlx.yml b/.github/workflows/build-mlx.yml index 4fe7f58606..5c71bf506a 100644 --- a/.github/workflows/build-mlx.yml +++ b/.github/workflows/build-mlx.yml @@ -75,6 +75,10 @@ jobs: # avoids patching setup.py. export CMAKE_ARGS="-DMLX_BUILD_METAL=OFF -DMLX_BUILD_CUDA=OFF -DCMAKE_INSTALL_LIBDIR=lib -G Ninja" export MLX_BUILD_BACKEND_PACKAGE=1 + # setup.py's get_version() only emits the clean tag version when + # PYPI_RELEASE=1; otherwise it appends .devYYYYMMDD+ + # regardless of building from an exact, unpatched tag checkout. + export PYPI_RELEASE=1 "$PY" -m build -w auditwheel repair dist/mlx_cpu-*.whl --plat manylinux_2_39_riscv64 --wheel-dir /output @@ -130,6 +134,8 @@ jobs: cd /mlx export CMAKE_ARGS="-DMLX_BUILD_METAL=OFF -DMLX_BUILD_CUDA=OFF -DCMAKE_INSTALL_LIBDIR=lib -G Ninja" export MLX_BUILD_FRONTEND_PACKAGE=1 + # See the build_backend job for why this is needed. + export PYPI_RELEASE=1 "$PY" -m build -w # libmlx.so ships separately in mlx-cpu, so it (and anything only reachable