From a9019da4458b691d68c94a3c37388e23db555f17 Mon Sep 17 00:00:00 2001 From: Sean Morgan Date: Thu, 20 Feb 2020 21:19:47 -0500 Subject: [PATCH 1/3] Fix labeled of macos wheels --- .github/workflows/macos_nightly.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos_nightly.yml b/.github/workflows/macos_nightly.yml index 2bf20ae0c2..dc6a1ce8be 100644 --- a/.github/workflows/macos_nightly.yml +++ b/.github/workflows/macos_nightly.yml @@ -56,7 +56,7 @@ jobs: --test_output=errors \ build_pip_pkg - bazel-bin/build_pip_pkg artifacts --nightly + bazel-bin/build_pip_pkg artifacts --plat-name macosx_10_13_x86_64 --nightly for f in artifacts/*.whl; do delocate-wheel -w wheelhouse $f done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7cb41df36..dff88f1ae1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: --test_output=errors \ build_pip_pkg - bazel-bin/build_pip_pkg artifacts + bazel-bin/build_pip_pkg artifacts --plat-name macosx_10_13_x86_64 for f in artifacts/*.whl; do delocate-wheel -w wheelhouse $f done From 6c7daf047b6e91e30ebea69fad63f4896b0d70ec Mon Sep 17 00:00:00 2001 From: Sean Morgan Date: Thu, 20 Feb 2020 21:57:57 -0500 Subject: [PATCH 2/3] Update plat version --- .github/workflows/macos_nightly.yml | 2 +- .github/workflows/release.yml | 2 +- build_deps/build_pip_pkg.sh | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos_nightly.yml b/.github/workflows/macos_nightly.yml index dc6a1ce8be..2bf20ae0c2 100644 --- a/.github/workflows/macos_nightly.yml +++ b/.github/workflows/macos_nightly.yml @@ -56,7 +56,7 @@ jobs: --test_output=errors \ build_pip_pkg - bazel-bin/build_pip_pkg artifacts --plat-name macosx_10_13_x86_64 --nightly + bazel-bin/build_pip_pkg artifacts --nightly for f in artifacts/*.whl; do delocate-wheel -w wheelhouse $f done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dff88f1ae1..a7cb41df36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: --test_output=errors \ build_pip_pkg - bazel-bin/build_pip_pkg artifacts --plat-name macosx_10_13_x86_64 + bazel-bin/build_pip_pkg artifacts for f in artifacts/*.whl; do delocate-wheel -w wheelhouse $f done diff --git a/build_deps/build_pip_pkg.sh b/build_deps/build_pip_pkg.sh index 481d06c37c..f734115369 100755 --- a/build_deps/build_pip_pkg.sh +++ b/build_deps/build_pip_pkg.sh @@ -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 @@ -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" @@ -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}" From 0777cea5a55f1332786d94e06803bb6572317a0a Mon Sep 17 00:00:00 2001 From: Sean Morgan Date: Fri, 21 Feb 2020 10:00:27 -0500 Subject: [PATCH 3/3] Fix string building --- build_deps/build_pip_pkg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_deps/build_pip_pkg.sh b/build_deps/build_pip_pkg.sh index f734115369..5c619a0b6b 100755 --- a/build_deps/build_pip_pkg.sh +++ b/build_deps/build_pip_pkg.sh @@ -89,9 +89,9 @@ function main() { if [[ -z ${NIGHTLY_FLAG} ]]; then # Windows has issues with locking library files for deletion so do not fail here - ${_PYTHON_BINARY} "${BUILD_CMD}" || true + ${_PYTHON_BINARY} ${BUILD_CMD} || true else - ${_PYTHON_BINARY} "${BUILD_CMD}" "${NIGHTLY_FLAG}" || true + ${_PYTHON_BINARY} ${BUILD_CMD} ${NIGHTLY_FLAG} || true fi cp dist/*.whl "${DEST}"