Skip to content

Commit

Permalink
Fix build-wheels.sh error when copying to output path (#1286)
Browse files Browse the repository at this point in the history
  • Loading branch information
lc525 authored Jul 11, 2023
1 parent 51071e5 commit 2f27444
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions hack/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,29 @@ fi
_buildWheel() {
local _srcPath=$1
local _outputPath=$2
local _currentDir=$PWD

# Poetry doesn't let us send the output to a separate folder so we'll `cd`
# into the folder and them move the wheels out
# https://github.com/python-poetry/poetry/issues/3586
pushd $_srcPath
poetry build
cp ./dist/* $_outputPath
# Only copy files if destination is different from source
local _currentDistPath=$PWD/dist
if ! [[ "$_currentDistPath" = "$_outputPath" ]]; then
cp $_currentDistPath/* $_outputPath
fi
popd
}

_main() {
# Convert any path into an absolute path
local _outputPath=$1
mkdir -p $_outputPath
if ! [[ "$_outputPath" = /* ]]; then
_outputPath="$PWD/$_outputPath"
pushd $_outputPath
_outputPath="$PWD"
popd
fi
mkdir -p $_outputPath

# Build MLServer
echo "---> Building MLServer wheel"
Expand Down

0 comments on commit 2f27444

Please sign in to comment.