@@ -79,11 +79,15 @@ jobs:
7979
8080 # Get the major and minor version of Python.
8181 # E.g if JAXCI_HERMETIC_PYTHON_VERSION=3.10, then python_major_minor=310
82- python_major_minor=$(echo "$JAXCI_HERMETIC_PYTHON_VERSION" | tr -d '.')
82+ # E.g if JAXCI_HERMETIC_PYTHON_VERSION=3.13-nogil, then python_major_minor=313t
83+ python_major_minor=$(echo "${JAXCI_HERMETIC_PYTHON_VERSION//-nogil/t}" | tr -d '.')
8384
8485 echo "OS=${os}" >> $GITHUB_ENV
8586 echo "ARCH=${arch}" >> $GITHUB_ENV
86- echo "PYTHON_MAJOR_MINOR=${python_major_minor}" >> $GITHUB_ENV
87+ # Python wheels follow a naming convention: standard wheels use the pattern
88+ # `*-cp<py_version>-cp<py_version>-*`, while free-threaded wheels use
89+ # `*-cp<py_version>-cp<py_version>t-*`.
90+ echo "PYTHON_MAJOR_MINOR=cp${python_major_minor%t}-cp${python_major_minor}-" >> $GITHUB_ENV
8791 - name : Download jaxlib wheel from GCS (non-Windows runs)
8892 id : download-wheel-artifacts-nw
8993 # Set continue-on-error to true to prevent actions from failing the workflow if this step
@@ -125,7 +129,19 @@ jobs:
125129 echo "Skipping the test run."
126130 exit 1
127131 - name : Install Python dependencies
128- run : $JAXCI_PYTHON -m uv pip install -r build/requirements.in
132+ run : |
133+ # TODO(srnitin): Remove after uv is installed in the Windows Dockerfile
134+ $JAXCI_PYTHON -m pip install uv~=0.5.30
135+ # python 3.13t cannot compile zstandard 0.23.0 due to
136+ # https://github.com/indygreg/python-zstandard/issues/231. Remove this once zstandard
137+ # has a prebuilt wheel for 3.13t or an env marker is available for free threading python
138+ # in requirements.in.
139+ if [[ $JAXCI_PYTHON =~ "python3.13-nogil" ]]; then
140+ grep -v "zstandard" build/requirements.in > build/requirements_without_zstandard.txt
141+ $JAXCI_PYTHON -m uv pip install -r build/requirements_without_zstandard.txt
142+ else
143+ $JAXCI_PYTHON -m uv pip install -r build/requirements.in
144+ fi
129145 # Halt for testing
130146 - name : Wait For Connection
131147 uses : google-ml-infra/actions/ci_connection@main
0 commit comments