File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff 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+
2630if is_windows; then
2731 PIP_FILE_PREFIX=" bazel-bin/build_pip_pkg.exe.runfiles/__main__/"
2832else
@@ -37,7 +41,7 @@ function abspath() {
3741
3842function 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} "
You can’t perform that action at this time.
0 commit comments