• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Fail on any error.
4set -e
5
6DEST="${KOKORO_ARTIFACTS_DIR}/dest"
7OUT="${KOKORO_ARTIFACTS_DIR}/out"
8PYTHON_SRC=${KOKORO_ARTIFACTS_DIR}/git/cpython3
9
10BASEDIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
11if [ "$(uname)" == "Darwin" ]; then
12    # http://g3doc/devtools/kokoro/g3doc/userdocs/macos/selecting_xcode
13    sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
14    export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
15    (cd "${PYTHON_SRC}"; git apply "${BASEDIR}/0001-Enable-arm64-builds.patch")
16fi
17
18python3 --version
19python3 ${BASEDIR}/build.py "${PYTHON_SRC}" "${OUT}" "${DEST}" "${KOKORO_BUILD_ID}"
20