Skip to content

Commit a97a0ac

Browse files
committed
chore(ci): fix pypy before-build
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]>
1 parent eb8e91d commit a97a0ac

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

pyproject.toml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,13 @@ exclude = '^(src/pact|tests)/(?!v3).+\.py$'
296296
before-build = """
297297
python -m pip install hatch
298298
hatch clean
299+
if ! command -v cargo &> /dev/null; then
300+
curl -sSf https://sh.rustup.rs | sh -s -- --profile=minimal -y
301+
for bin in $(ls "$HOME/.cargo/bin"); do
302+
ln -v "$HOME/.cargo/bin/$bin" "/usr/bin/$bin"
303+
done
304+
rustup show
305+
fi
299306
"""
300307
test-command = """
301308
python -c \
@@ -310,14 +317,3 @@ assert isinstance(pact.v3.ffi.version(), str);\""""
310317
# The repair tool unfortunately did not like the bundled Ruby distributable.
311318
# TODO: Check whether delocate-wheel can be configured.
312319
repair-wheel-command = ""
313-
314-
[[tool.cibuildwheel.overrides]]
315-
# Pydantic for pypy needs to be built from source, which requires Rust.
316-
select = "pp*-*linux*"
317-
before-test = """
318-
curl -sSf https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y
319-
for bin in $(ls "$HOME/.cargo/bin"); do
320-
ln -v "$HOME/.cargo/bin/$bin" "/usr/bin/$bin"
321-
done
322-
rustup show
323-
"""

0 commit comments

Comments
 (0)