Skip to content

Commit 2be5aeb

Browse files
author
Matthias Koeppe
committed
.github/workflows/wheels.yml: Get pipx as done in sagemath/sage#37503
1 parent a0156f8 commit 2be5aeb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/wheels.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ jobs:
8484
name: dist
8585
path: dist
8686

87+
- uses: actions/setup-python@v5
88+
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
89+
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
90+
id: python
91+
with:
92+
python-version: "3.8 - 3.12"
93+
update-environment: false
94+
8795
- name: Build platform wheels
8896
# We build the wheel from the sdist.
8997
# But we must run cibuildwheel with the unpacked source directory, not a tarball,
@@ -92,12 +100,13 @@ jobs:
92100
# In the CIBW_BEFORE_ALL phase, we install libraries using the Sage distribution.
93101
# https://cibuildwheel.readthedocs.io/en/stable/options/#before-all
94102
run: |
103+
"${{ steps.python.outputs.python-path }}" -m pip install pipx
95104
export PATH=build/bin:$PATH
96105
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE"
97106
mkdir -p unpacked
98107
for pkg in cypari2; do
99108
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
100-
pipx run cibuildwheel==2.17.0 unpacked/$pkg*
109+
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
101110
done
102111
103112
- uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)