Skip to content

Commit 8ad8e04

Browse files
authored
mlx: set PYPI_RELEASE=1 to avoid a dev version (#1935)
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+<git-hash>, 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).
1 parent 544d5b5 commit 8ad8e04

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/build-mlx.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ jobs:
7575
# avoids patching setup.py.
7676
export CMAKE_ARGS="-DMLX_BUILD_METAL=OFF -DMLX_BUILD_CUDA=OFF -DCMAKE_INSTALL_LIBDIR=lib -G Ninja"
7777
export MLX_BUILD_BACKEND_PACKAGE=1
78+
# setup.py's get_version() only emits the clean tag version when
79+
# PYPI_RELEASE=1; otherwise it appends .devYYYYMMDD+<git-hash>
80+
# regardless of building from an exact, unpatched tag checkout.
81+
export PYPI_RELEASE=1
7882
"$PY" -m build -w
7983
8084
auditwheel repair dist/mlx_cpu-*.whl --plat manylinux_2_39_riscv64 --wheel-dir /output
@@ -130,6 +134,8 @@ jobs:
130134
cd /mlx
131135
export CMAKE_ARGS="-DMLX_BUILD_METAL=OFF -DMLX_BUILD_CUDA=OFF -DCMAKE_INSTALL_LIBDIR=lib -G Ninja"
132136
export MLX_BUILD_FRONTEND_PACKAGE=1
137+
# See the build_backend job for why this is needed.
138+
export PYPI_RELEASE=1
133139
"$PY" -m build -w
134140
135141
# libmlx.so ships separately in mlx-cpu, so it (and anything only reachable

0 commit comments

Comments
 (0)