diff --git a/scripts/build_wheels.sh b/scripts/build_wheels.sh index 8127543..f1eb7c2 100755 --- a/scripts/build_wheels.sh +++ b/scripts/build_wheels.sh @@ -17,6 +17,9 @@ set -e -u -x +PACKAGE_NAME=pygridgain +PY_VERS="cp39 cp310 cp311 cp312 cp313" + function repair_wheel { wheel="$1" if ! auditwheel show "$wheel"; then @@ -26,25 +29,34 @@ function repair_wheel { fi } -# Compile wheels -for PYBIN in /opt/python/*/bin; do - if [[ $PYBIN =~ ^(.*)cp39(.*)$ ]] || [[ $PYBIN =~ ^(.*)cp31[0123](.*)$ ]]; then - "${PYBIN}/pip" wheel /pygridgain/ --no-deps -w /wheels - fi -done +for PY_VER in $PY_VERS; do + for PYBIN in /opt/python/*/bin; do + if [[ $PYBIN =~ ^(.*)$PY_VER/(.*)$ ]]; then + echo -e "\e[32m >>> \e[0m" + echo -e "\e[32m >>> Preparing a wheel for Python $PYBIN \e[0m" + echo -e "\e[32m >>> \e[0m" -# Bundle external shared libraries into the wheels -for whl in /wheels/*.whl; do - repair_wheel "$whl" + # Compile wheels + "${PYBIN}/pip" wheel /$PACKAGE_NAME/ --no-deps -w /wheels + + # Bundle external shared libraries into the wheels + for whl in /wheels/*.whl; do + if [[ $whl =~ ^(.*)$PY_VER-(.*)$ ]] && [[ ! $whl =~ ^(.*)manylinux(.*)$ ]]; then + "${PYBIN}/pip" wheel /$PACKAGE_NAME/ --no-deps -w /wheels + repair_wheel "$whl" + fi + done + fi + done done for whl in /wheels/*.whl; do if [[ ! $whl =~ ^(.*)manylinux(.*)$ ]]; then rm "$whl" - else - chmod 666 "$whl" fi done -rm -rf /pygridgain/*.egg-info -rm -rf /pygridgain/.eggs +chown -R `stat -c "%u:%g" /wheels` /wheels/* + +rm -rf /$PACKAGE_NAME/*.egg-info +rm -rf /$PACKAGE_NAME/.eggs diff --git a/scripts/create_distr.sh b/scripts/create_distr.sh index 797f199..ee41f44 100755 --- a/scripts/create_distr.sh +++ b/scripts/create_distr.sh @@ -15,9 +15,13 @@ # limitations under the License. # +PACKAGE_NAME=pygridgain DISTR_DIR="$(pwd)/distr/" SRC_DIR="$(pwd)" -DEFAULT_DOCKER_IMAGE="quay.io/pypa/manylinux2010_x86_64" +PLATFORM_X86="manylinux2014_i686" +PLATFORM_X86_64="manylinux2014_x86_64" +DOCKER_IMAGE_X86="quay.io/pypa/$PLATFORM_X86" +DOCKER_IMAGE_X86_64="quay.io/pypa/$PLATFORM_X86_64" usage() { cat <