@@ -35,10 +35,6 @@ permissions:
3535 contents : read # to fetch code (actions/checkout)
3636
3737env :
38- # Upstream pushes no git tag for its releases; this commit sets
39- # VERSION = (1, 9, 'dev', 15) and its tree is byte-identical to the released
40- # sdist. Move it together with the version in docs/packages/python-sat.yaml.
41- PYTHON_SAT_REF : 152884a6d1889f56a61049aaa773be23f0a8d8c1
4238 MANYLINUX_RISCV64_IMAGE : quay.io/pypa/manylinux_2_39_riscv64
4339 MUSLLINUX_RISCV64_IMAGE : quay.io/pypa/musllinux_1_2_riscv64
4440
@@ -66,11 +62,24 @@ jobs:
6662 PYTHON_SAT_VERSION : ${{ matrix.version }}
6763
6864 steps :
69- - name : Checkout pysat ${{ env.PYTHON_SAT_REF }}
65+ # Upstream pushes no git tag for its releases; each commit below sets
66+ # VERSION = (1, 9, 'dev', N) and its tree is the released sdist's. Add the
67+ # commit of every new version here, together with docs/packages/python-sat.yaml.
68+ - name : Resolve upstream commit for ${{ env.PYTHON_SAT_VERSION }}
69+ id : upstream_ref
70+ run : |
71+ case "$PYTHON_SAT_VERSION" in
72+ 1.9.dev15) ref=152884a6d1889f56a61049aaa773be23f0a8d8c1 ;;
73+ 1.9.dev17) ref=5c6d801fb1fae958f6504af5692fa26b807c8e76 ;;
74+ *) echo "No upstream commit recorded for python-sat $PYTHON_SAT_VERSION" >&2; exit 1 ;;
75+ esac
76+ echo "ref=${ref}" >> "$GITHUB_OUTPUT"
77+
78+ - name : Checkout pysat ${{ steps.upstream_ref.outputs.ref }}
7079 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7180 with :
7281 repository : pysathq/pysat
73- ref : ${{ env.PYTHON_SAT_REF }}
82+ ref : ${{ steps.upstream_ref.outputs.ref }}
7483 persist-credentials : false
7584
7685 - name : Checkout python-wheels
@@ -106,14 +115,18 @@ jobs:
106115 # Rewrite that one slot to 0 in the unpacked sdist before installing it.
107116 # The python-sat wheel itself builds unchanged on musllinux; only this
108117 # test dependency needs the workaround. Alpine is detected in-container.
118+ # From 1.9.dev17 requirements.txt lists pindakaas (a Rust extension with no
119+ # riscv64 wheel) instead of pypblib; the tests that need it importorskip it,
120+ # so it is left out rather than source-built.
109121 CIBW_BEFORE_TEST : >-
110- if [ -f /etc/alpine-release ]; then
122+ if [ -f /etc/alpine-release ] && grep -q '^pypblib' {project}/requirements.txt ; then
111123 pip download --no-deps --no-binary :all: pypblib==0.0.4 -d /tmp/pypblib &&
112124 tar -xzf /tmp/pypblib/pypblib-0.0.4.tar.gz -C /tmp/pypblib &&
113125 sed -i 's|NULL\(, */\* tp_print \*/\)|0\1|' /tmp/pypblib/pypblib-0.0.4/Modules/pblib/*.cpp &&
114126 CPPFLAGS="-include sys/types.h" pip install /tmp/pypblib/pypblib-0.0.4;
115127 fi &&
116- pip install -r {project}/requirements.txt
128+ grep -v '^pindakaas' {project}/requirements.txt > /tmp/requirements.txt &&
129+ pip install -r /tmp/requirements.txt
117130 CIBW_TEST_REQUIRES : pytest
118131 CIBW_TEST_SOURCES : tests
119132 CIBW_TEST_COMMAND : >-
0 commit comments