Skip to content

Commit

Permalink
Fix label of macos version in wheels (#1124)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 9d3bd3d commit 2ce92ab
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions build_deps/build_pip_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function is_windows() {
[[ "${PLATFORM}" =~ msys_nt*|mingw*|cygwin*|uwin* ]]
}

function is_macos() {
[[ "${PLATFORM}" == "darwin" ]]
}

if is_windows; then
PIP_FILE_PREFIX="bazel-bin/build_pip_pkg.exe.runfiles/__main__/"
else
Expand All @@ -37,7 +41,7 @@ function abspath() {

function main() {
DEST=${1}
BUILD_FLAG=${2}
NIGHTLY_FLAG=${2}

if [[ -z ${DEST} ]]; then
echo "No destination dir provided"
Expand Down Expand Up @@ -77,11 +81,17 @@ function main() {
pushd ${TMPDIR}
echo $(date) : "=== Building wheel"

if [[ -z ${BUILD_FLAG} ]]; then

BUILD_CMD="setup.py bdist_wheel"
if is_macos; then
BUILD_CMD="${BUILD_CMD} --plat-name macosx_10_13_x86_64"
fi

if [[ -z ${NIGHTLY_FLAG} ]]; then
# Windows has issues with locking library files for deletion so do not fail here
${_PYTHON_BINARY} setup.py bdist_wheel || true
${_PYTHON_BINARY} ${BUILD_CMD} || true
else
${_PYTHON_BINARY} setup.py bdist_wheel "${2}" || true
${_PYTHON_BINARY} ${BUILD_CMD} ${NIGHTLY_FLAG} || true
fi

cp dist/*.whl "${DEST}"
Expand Down

0 comments on commit 2ce92ab

Please sign in to comment.