Skip to content

Commit

Permalink
chore(ci): fix pypy before-build
Browse files Browse the repository at this point in the history
Rust needs to be manually installed within the pypy build image;
however, with the addition of `before-build`, it would appear that the
existing `before-build` no longer works.

The installation of the Rust toolchain has been moved to the
`before-all` step.

Signed-off-by: JP-Ellis <[email protected]>
  • Loading branch information
JP-Ellis committed Mar 6, 2024
1 parent eb8e91d commit a97a0ac
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ exclude = '^(src/pact|tests)/(?!v3).+\.py$'
before-build = """
python -m pip install hatch
hatch clean
if ! command -v cargo &> /dev/null; then
curl -sSf https://sh.rustup.rs | sh -s -- --profile=minimal -y
for bin in $(ls "$HOME/.cargo/bin"); do
ln -v "$HOME/.cargo/bin/$bin" "/usr/bin/$bin"
done
rustup show
fi
"""
test-command = """
python -c \
Expand All @@ -310,14 +317,3 @@ assert isinstance(pact.v3.ffi.version(), str);\""""
# The repair tool unfortunately did not like the bundled Ruby distributable.
# TODO: Check whether delocate-wheel can be configured.
repair-wheel-command = ""

[[tool.cibuildwheel.overrides]]
# Pydantic for pypy needs to be built from source, which requires Rust.
select = "pp*-*linux*"
before-test = """
curl -sSf https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y
for bin in $(ls "$HOME/.cargo/bin"); do
ln -v "$HOME/.cargo/bin/$bin" "/usr/bin/$bin"
done
rustup show
"""

0 comments on commit a97a0ac

Please sign in to comment.