Skip to content

Commit 741672b

Browse files
committed
ci: move build-wheels script from old workspace repo
1 parent 91342d5 commit 741672b

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/build-wheels

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# Build pkgcraft wheels using cibuildwheel with podman or docker.
3+
4+
ARCHES=${@:-x86_64}
5+
6+
# default to using podman on linux
7+
if [[ ${OSTYPE} == "linux-"* ]]; then
8+
: ${CIBW_CONTAINER_ENGINE:=podman}
9+
export CIBW_CONTAINER_ENGINE
10+
fi
11+
12+
: ${CIBW_PLATFORM:=linux}
13+
export CIBW_PLATFORM
14+
15+
python -m venv venv
16+
source venv/bin/activate
17+
pip install --upgrade pip
18+
19+
# build sdist if it doesn't exist
20+
if ! compgen -G "dist/*.tar.gz" >/dev/null; then
21+
pip install tox
22+
tox -e sdist
23+
fi
24+
25+
# build wheels
26+
pip install cibuildwheel
27+
cibuildwheel --output-dir wheels --archs ${ARCHES}

0 commit comments

Comments
 (0)