Skip to content

Commit

Permalink
pin multibuild, set MB_ML_VER explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Nov 16, 2021
1 parent 157c1c0 commit ad6c7d5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 12 deletions.
34 changes: 23 additions & 11 deletions kokoro/release/python/linux/build_artifacts.sh
Expand Up @@ -25,13 +25,14 @@ rm -rf multibuild/
mkdir artifacts
export ARTIFACT_DIR=$(pwd)/artifacts

# Pin multibuild script to a version just before the default
# manylinux image has switched from manylinux1 to manylinux2014.
# Also, pinning version avoid potentially unwanted future changes from
# silently creeping in.
# See https://github.com/protocolbuffers/protobuf/issues/9180
git clone https://github.com/matthew-brett/multibuild.git
(cd multibuild; git checkout 13a01725b0f0aa551ab34aa2311cdc1c77be4337)
# Pin multibuild scripts at a known commit to avoid potentially unwanted future changes from
# silently creeping in (see https://github.com/protocolbuffers/protobuf/issues/9180).
# IMPORTANT: always pin multibuild at the same commit for:
# - linux/build_artifacts.sh
# - linux/build_artifacts.sh
# - windows/build_artifacts.bat
(cd multibuild; git checkout b89bb903e94308be79abefa4f436bf123ebb1313)
cp kokoro/release/python/linux/config.sh config.sh

build_artifact_version() {
Expand All @@ -53,21 +54,32 @@ build_artifact_version() {
sudo rm -rf $REPO_DIR
}

build_x86_64_artifact_version() {
# Explicitly request building manylinux1 wheels, which is no longer the default.
# https://github.com/protocolbuffers/protobuf/issues/9180
MB_ML_VER=1

# TODO(jtatermusch): currently when crosscompiling, "auditwheel repair" will be disabled
# since auditwheel doesn't work for crosscomiled wheels.
build_artifact_version $@
}

build_crosscompiled_aarch64_artifact_version() {
# crosscompilation is only supported with the dockcross manylinux2014 image
DOCKER_IMAGE=dockcross/manylinux2014-aarch64:20210706-65bf2dd
MB_ML_VER=2014
PLAT=aarch64

# TODO(jtatermusch): currently when crosscompiling, "auditwheel repair" will be disabled
# since auditwheel doesn't work for crosscomiled wheels.
build_artifact_version $@
}

build_artifact_version 3.6
build_artifact_version 3.7
build_artifact_version 3.8
build_artifact_version 3.9
build_artifact_version 3.10
build_x86_64_artifact_version 3.6
build_x86_64_artifact_version 3.7
build_x86_64_artifact_version 3.8
build_x86_64_artifact_version 3.9
build_x86_64_artifact_version 3.10

build_crosscompiled_aarch64_artifact_version 3.7
build_crosscompiled_aarch64_artifact_version 3.8
Expand Down
9 changes: 8 additions & 1 deletion kokoro/release/python/macos/build_artifacts.sh
Expand Up @@ -25,7 +25,14 @@ rm -rf multibuild/
mkdir artifacts
export ARTIFACT_DIR=$(pwd)/artifacts

git clone https://github.com/matthew-brett/multibuild.git
git clone https://github.com/matthew-brett/
# Pin multibuild scripts at a known commit to avoid potentially unwanted future changes from
# silently creeping in (see https://github.com/protocolbuffers/protobuf/issues/9180).
# IMPORTANT: always pin multibuild at the same commit for:
# - linux/build_artifacts.sh
# - linux/build_artifacts.sh
# - windows/build_artifacts.bat
(cd multibuild; git checkout b89bb903e94308be79abefa4f436bf123ebb1313)
cp kokoro/release/python/macos/config.sh config.sh

OLD_PATH=$PATH
Expand Down
9 changes: 9 additions & 0 deletions kokoro/release/python/windows/build_artifacts.bat
Expand Up @@ -14,6 +14,15 @@ set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%

REM Fetch multibuild
git clone https://github.com/matthew-brett/multibuild.git
REM Pin multibuild scripts at a known commit to avoid potentially unwanted future changes from
REM silently creeping in (see https://github.com/protocolbuffers/protobuf/issues/9180).
REM IMPORTANT: always pin multibuild at the same commit for:
REM - linux/build_artifacts.sh
REM - linux/build_artifacts.sh
REM - windows/build_artifacts.bat
cd multibuild
git checkout b89bb903e94308be79abefa4f436bf123ebb1313
cd ..

REM Install zlib
mkdir zlib
Expand Down

0 comments on commit ad6c7d5

Please sign in to comment.