Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build-wheels.sh error when copying to output path #1286

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
adriangonz marked this conversation as resolved.
Show resolved Hide resolved
fi
mkdir -p $_outputPath

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