Skip to content

Commit f99f5e0

Browse files
committed
fix: get minimum version from crate
Refs: PyO3/pyo3#5516 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
1 parent cb942c9 commit f99f5e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
CARGO_TOML_CONTENT=$(tar -xzO -f "$TMP_CRATE" "pyo3-ffi-$PYO3_FFI_VERSION/Cargo.toml" 2>/dev/null || true)
3737
# get the supported CPython max version from the pyo3-ffi crate (from the extracted Cargo.toml)
3838
MAX_VERSION=$(echo "$CARGO_TOML_CONTENT" | uvx --from=toml-cli toml get --toml-path=/dev/stdin package.metadata.cpython.max-version | tr -d '"')
39+
# get the supported PyPy min version
40+
PYPY_MIN=$(echo "$CARGO_TOML_CONTENT" | uvx --from=toml-cli toml get --toml-path=/dev/stdin package.metadata.pypy.min-version | tr -d '"')
3941
# get the supported PyPy max version
4042
PYPY_MAX=$(echo "$CARGO_TOML_CONTENT" | uvx --from=toml-cli toml get --toml-path=/dev/stdin package.metadata.pypy.max-version | tr -d '"')
4143
# gather the list once and derive CPython and (optional) PyPy sets from it
@@ -52,7 +54,7 @@ jobs:
5254
(.v.major < $maxv.major or (.v.major == $maxv.major and .v.minor <= $maxv.minor)))
5355
))
5456
| map("\(.v.major).\(.v.minor)\(if .t=="freethreaded" then "t" else "" end)")')
55-
PYPY_VERSIONS=$(echo "$LIST" | jq -c --arg min "$MIN_VERSION" --arg max "$PYPY_MAX" '
57+
PYPY_VERSIONS=$(echo "$LIST" | jq -c --arg min "$PYPY_MIN" --arg max "$PYPY_MAX" '
5658
($min | split(".") | {major: .[0]|tonumber, minor: .[1]|tonumber}) as $minv |
5759
($max | split(".") | {major: .[0]|tonumber, minor: .[1]|tonumber}) as $maxv |
5860
[.[] | {v:.version_parts, t:.variant, impl:.implementation}]

0 commit comments

Comments
 (0)