@@ -10,20 +10,12 @@ CHECK_SHA256=.github/scripts/check_sha256.sh
1010# List python versions
1111ls /opt/python
1212
13- if [ $PYTHON_VERSION == " 3.9" ]; then
14- PYBIN=" /opt/python/cp39-cp39/bin"
15- elif [ $PYTHON_VERSION == " 3.10" ]; then
16- PYBIN=" /opt/python/cp310-cp310/bin"
17- elif [ $PYTHON_VERSION == " 3.11" ]; then
18- PYBIN=" /opt/python/cp311-cp311/bin"
19- elif [ $PYTHON_VERSION == " 3.12" ]; then
20- PYBIN=" /opt/python/cp312-cp312/bin"
21- elif [ $PYTHON_VERSION == " 3.13" ]; then
22- PYBIN=" /opt/python/cp313-cp313/bin"
23- elif [ $PYTHON_VERSION == " 3.14" ]; then
24- PYBIN=" /opt/python/cp314-cp314/bin"
25- else
26- echo " Unsupported Python version $PYTHON_VERSION "
13+ # Compute PYBIN from PYTHON_VERSION (e.g., "3.14" -> "cp314-cp314")
14+ PYVER_NO_DOT=${PYTHON_VERSION// ./ }
15+ PYBIN=" /opt/python/cp${PYVER_NO_DOT} -cp${PYVER_NO_DOT} /bin"
16+
17+ if [ ! -d " $PYBIN " ]; then
18+ echo " Python version $PYTHON_VERSION not found at $PYBIN "
2719 exit 1
2820fi
2921
@@ -92,6 +84,10 @@ retry yum install -y libpng-devel freetype-devel
9284# Install numpy/scipy deps
9385retry yum install -y lapack-devel blas-devel
9486
87+ # Upgrade pip and prefer binary packages
88+ ${PYBIN} /python -m pip install --upgrade pip
89+ export PIP_PREFER_BINARY=1
90+
9591# install compile-time dependencies
9692retry ${PYBIN} /pip install numpy==${NUMPY_VERSION} cython setuptools
9793
0 commit comments