[struct2tensor][OSS] make build_pip_package.sh macos compatible, and kokoro compatible.
[struct2tensor][OSS] make build_pip_package.sh macos compatible, and kokoro compatible.

Currently this file only works on ubuntu. For example, "mktemp" does not have a -t flag on macos.

TESTED=build works for macos: http://sponge2/d09d6700-d159-44c2-b7c0-c888c4652d78

I tested the presubmit for macos py37 here: cl/297613942
It is able to build the wheel successfully, however some python tests are failing - but that should be irrelevant to this shell script.

PiperOrigin-RevId: 297848028

google/struct2tensor,google/struct2tensor,google/struct2tensor