Skip to content

Commit 2ce92ab

Browse files
Fix label of macos version in wheels (#1124)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 9d3bd3d commit 2ce92ab

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

build_deps/build_pip_pkg.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ function is_windows() {
2323
[[ "${PLATFORM}" =~ msys_nt*|mingw*|cygwin*|uwin* ]]
2424
}
2525

26+
function is_macos() {
27+
[[ "${PLATFORM}" == "darwin" ]]
28+
}
29+
2630
if is_windows; then
2731
PIP_FILE_PREFIX="bazel-bin/build_pip_pkg.exe.runfiles/__main__/"
2832
else
@@ -37,7 +41,7 @@ function abspath() {
3741

3842
function main() {
3943
DEST=${1}
40-
BUILD_FLAG=${2}
44+
NIGHTLY_FLAG=${2}
4145

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

80-
if [[ -z ${BUILD_FLAG} ]]; then
84+
85+
BUILD_CMD="setup.py bdist_wheel"
86+
if is_macos; then
87+
BUILD_CMD="${BUILD_CMD} --plat-name macosx_10_13_x86_64"
88+
fi
89+
90+
if [[ -z ${NIGHTLY_FLAG} ]]; then
8191
# Windows has issues with locking library files for deletion so do not fail here
82-
${_PYTHON_BINARY} setup.py bdist_wheel || true
92+
${_PYTHON_BINARY} ${BUILD_CMD} || true
8393
else
84-
${_PYTHON_BINARY} setup.py bdist_wheel "${2}" || true
94+
${_PYTHON_BINARY} ${BUILD_CMD} ${NIGHTLY_FLAG} || true
8595
fi
8696

8797
cp dist/*.whl "${DEST}"

0 commit comments

Comments
 (0)