@@ -156,36 +156,57 @@ if [ -e /opt/python ] ; then
156156 if [[ " $PYBUILD " == cp33* ]]; then
157157 continue
158158 fi
159- rm -fr ${BUILD_PATH}
159+ rm -fr " ${BUILD_PATH} "
160160
161161 run " Configure ${PYBUILD} " cmake $SOURCE_PATH -B${BUILD_PATH} -DPython_EXECUTABLE=${PYTHON_BIN} /python ${CMAKE_EXTRA_FLAGS} -DSKIP_PACKAGE_ALL_WHEEL=ON -DPYTHON_WHEEL_PREFIX=${ARTIFACT_PATH} /tmp -DENABLE_CSHARP=OFF
162162
163163 run " Test ${PYBUILD} " cmake --build $BUILD_PATH --target check -- -j${THREAD_COUNT}
164164 run " Build ${PYBUILD} " cmake --build $BUILD_PATH --target package_wheel -- -j${THREAD_COUNT}
165- auditwheel show ${ARTIFACT_PATH} /tmp/interop* ${PYBUILD} * linux_x86_64 .whl
166- auditwheel repair ${ARTIFACT_PATH} /tmp/interop* ${PYBUILD} * linux_x86_64 .whl -w ${ARTIFACT_PATH}
167- rm -fr ${ARTIFACT_PATH} /tmp
165+ auditwheel show ${ARTIFACT_PATH} /tmp/interop* ${PYBUILD} * linux_ * .whl
166+ auditwheel repair ${ARTIFACT_PATH} /tmp/interop* ${PYBUILD} * linux_ * .whl -w ${ARTIFACT_PATH}
167+ rm -fr " ${ARTIFACT_PATH} /tmp"
168168 done
169169 else
170- /opt/python/cp38-cp38/bin/python -m pip install numpy==1.17.3 pandas setuptools
171- /opt/python/cp39-cp39/bin/python -m pip install numpy==2.0.0 pandas setuptools
172- /opt/python/cp310-cp310/bin/python -m pip install numpy==2.0.0 pandas setuptools
173- /opt/python/cp311-cp311/bin/python -m pip install numpy==2.0.0 pandas setuptools
174- /opt/python/cp312-cp312/bin/python -m pip install numpy==2.0.0 pandas setuptools
175- /opt/python/cp313-cp313/bin/python -m pip install numpy==2.0.0 pandas setuptools
176- /opt/python/cp314-cp314/bin/python -m pip install numpy==2.0.0 pandas setuptools
177- /opt/python/cp310-cp310/bin/python -m pip install swig==4.0.2 --prefix=/tmp/usr
178170
179- echo " Build with specific Python Version: ${PYTHON_VERSION} "
180- PYTHON_BIN=/opt/python/${PYTHON_VERSION} /bin
181- rm -fr ${BUILD_PATH} /src/ext/python/*
182- run " Configure ${PYTHON_VERSION} " cmake $SOURCE_PATH -B${BUILD_PATH} -DPython_EXECUTABLE=${PYTHON_BIN} /python ${CMAKE_EXTRA_FLAGS} -DSKIP_PACKAGE_ALL_WHEEL=ON -DPYTHON_WHEEL_PREFIX=${ARTIFACT_PATH} /tmp -DENABLE_CSHARP=OFF -DSWIG_EXECUTABLE=/tmp/usr/lib/python3.10/site-packages/swig/data/bin/swig -DSWIG_DIR=/tmp/usr/lib/python3.10/site-packages/swig/data/share/swig/4.0.2/
171+ echo " Build with specific Python Version: ${PYTHON_VERSION} "
172+ if [[ " $PYTHON_VERSION " != " cp" * ]]; then
173+ pyver=" cp${PYTHON_VERSION/ ./ } "
174+ PYTHON_VERSION=" ${pyver} -${pyver} "
175+ echo " Converted to PYTHON_VERSION=${PYTHON_VERSION} "
176+ fi
177+ if [[ " $PYTHON_VERSION " == " cp38-cp38" ]]; then
178+ set +e
179+ /opt/python/${PYTHON_VERSION} /bin/python -m pip install numpy==1.17.3 pandas setuptools --only-binary numpy,pandas
180+ if [ $? -ne 0 ] ; then
181+ /opt/python/${PYTHON_VERSION} /bin/python -m pip install numpy==1.19.0 pandas setuptools --only-binary numpy,pandas
182+ fi
183+ set -e
184+ else
185+ # We are using an older CentOS 7 image, so we should rebuild numpy and pandas from source
186+ /opt/python/${PYTHON_VERSION} /bin/python -m pip install numpy> =2.0.0 setuptools
187+ fi
188+ /opt/python/cp310-cp310/bin/python -m pip install swig==4.0.2 --prefix=/tmp/usr
183189
184- run " Test ${PYTHON_VERSION} " cmake --build $BUILD_PATH --target check -- -j${THREAD_COUNT}
185- run " Build ${PYTHON_VERSION} " cmake --build $BUILD_PATH --target package_wheel -- -j${THREAD_COUNT}
186- auditwheel show ${ARTIFACT_PATH} /tmp/interop* ${PYTHON_VERSION} * linux_x86_64.whl
187- auditwheel repair ${ARTIFACT_PATH} /tmp/interop* ${PYTHON_VERSION} * linux_x86_64.whl -w ${ARTIFACT_PATH}
188- rm -fr ${ARTIFACT_PATH} /tmp
190+ PYTHON_BIN=" /opt/python/${PYTHON_VERSION} /bin"
191+ rm -fr " ${BUILD_PATH} /src/ext/python/*"
192+ run " Configure ${PYTHON_VERSION} " cmake $SOURCE_PATH -B${BUILD_PATH} -DPython_EXECUTABLE=${PYTHON_BIN} /python ${CMAKE_EXTRA_FLAGS} -DSKIP_PACKAGE_ALL_WHEEL=ON -DPYTHON_WHEEL_PREFIX=${ARTIFACT_PATH} /tmp -DENABLE_CSHARP=OFF -DSWIG_EXECUTABLE=/tmp/usr/lib/python3.10/site-packages/swig/data/bin/swig -DSWIG_DIR=/tmp/usr/lib/python3.10/site-packages/swig/data/share/swig/4.0.2/
193+
194+ set +e
195+ for attempt in 1 2 3; do
196+ run " Test ${PYTHON_VERSION} " cmake --build $BUILD_PATH --target check -- -j${THREAD_COUNT}
197+ done
198+ set -e
199+ run " Test ${PYTHON_VERSION} " cmake --build $BUILD_PATH --target check -- -j${THREAD_COUNT}
200+
201+ set +e
202+ for attempt in 1 2 3; do
203+ run " Build ${PYTHON_VERSION} " cmake --build $BUILD_PATH --target package_wheel -- -j${THREAD_COUNT}
204+ done
205+ set -e
206+ run " Build ${PYTHON_VERSION} " cmake --build $BUILD_PATH --target package_wheel -- -j${THREAD_COUNT}
207+ auditwheel show ${ARTIFACT_PATH} /tmp/interop* ${PYTHON_VERSION} * linux_* .whl
208+ auditwheel repair ${ARTIFACT_PATH} /tmp/interop* ${PYTHON_VERSION} * linux_* .whl -w ${ARTIFACT_PATH}
209+ rm -fr " ${ARTIFACT_PATH} /tmp"
189210 fi
190211elif [ " $PYTHON_VERSION " != " " ] && [ " $PYTHON_VERSION " != " Disable" ] && [ " $PYTHON_VERSION " != " DotNetStandard" ] && [ " $PYTHON_VERSION " != " None" ] ; then
191212 if [ " $PYTHON_VERSION " == " ALL" ] ; then
@@ -254,7 +275,7 @@ elif [ "$PYTHON_VERSION" != "" ] && [ "$PYTHON_VERSION" != "Disable" ] && [ "$PY
254275 which pip
255276 python -m pip install delocate || true
256277 python --version
257- python -m pip install numpy
278+ python -m pip install numpy --only-binary numpy,pandas
258279 python -m pip install wheel
259280 python -m pip install setuptools
260281 echo " Check setuptools"
0 commit comments