Skip to content

Commit

Permalink
Skip ONNX script on macOS (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Dec 3, 2020
1 parent 551aeaf commit bc608d5
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tools/onnx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ venv() {
msys*) source ${env_dir}/Scripts/activate;;
*) source ${env_dir}/bin/activate;;
esac
${python} -m pip install --quiet --upgrade pip
${python} -m pip install --quiet --upgrade pip setuptools wheel
}

clean() {
bold "sklearn clean"
rm -rf "./third_party/env/onnx"
rm -rf "./third_party/source/onnx"
}

sync() {
Expand All @@ -36,8 +42,8 @@ sync() {

install() {
bold "onnx install"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
if [ "$(uname -s)" = "Darwin" ]; then
echo "- macos [skip]"
return
fi
case "${OSTYPE}" in
Expand Down Expand Up @@ -77,7 +83,7 @@ install() {
export MACOSX_DEPLOYMENT_TARGET=10.9
export ONNX_ML=1
export ONNX_NAMESPACE=onnx
${python} -m pip install --quiet "./third_party/source/onnx"
${python} -m pip install --quiet --no-use-pep517 "./third_party/source/onnx"
deactivate
}

Expand All @@ -92,8 +98,8 @@ schema() {

metadata() {
bold "onnx metadata"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
if [ "$(uname -s)" = "Darwin" ]; then
echo "- macos [skip]"
return
fi
[[ $(grep -U $'\x0D' ./source/onnx-metadata.json) ]] && crlf=1
Expand Down

0 comments on commit bc608d5

Please sign in to comment.