rustPlatform.maturinBuildHook: specify the output directory (#291025)

This commit is contained in:
Dmitry Kalinkin 2024-06-13 19:21:52 -04:00 committed by GitHub
parent 67b4bf1df4
commit fbd21c5067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,9 @@ maturinBuildHook() {
runHook preBuild
# Put the wheel to dist/ so that regular Python tooling can find it.
local dist="$PWD/dist"
if [ ! -z "${buildAndTestSubdir-}" ]; then
pushd "${buildAndTestSubdir}"
fi
@ -16,6 +19,7 @@ maturinBuildHook() {
--manylinux off \
--strip \
--release \
--out "$dist" \
${maturinBuildFlags-}
)
@ -23,10 +27,6 @@ maturinBuildHook() {
popd
fi
# Move the wheel to dist/ so that regular Python tooling can find it.
mkdir -p dist
mv ${cargoRoot:+$cargoRoot/}target/wheels/*.whl dist/
# These are python build hooks and may depend on ./dist
runHook postBuild