-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathrelease-pypi-linux.sh
More file actions
25 lines (20 loc) · 808 Bytes
/
release-pypi-linux.sh
File metadata and controls
25 lines (20 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
set -e
# Linux wheels are built inside manylinux2014 containers managed by cibuildwheel.
python -m pip install --upgrade pip cibuildwheel twine build
export CIBW_BUILD="cp310-* cp311-* cp312-* cp313-* cp314-*"
export CIBW_SKIP="*-musllinux_*"
export CIBW_MANYLINUX_X86_64_IMAGE="manylinux2014"
export CIBW_MANYLINUX_AARCH64_IMAGE="manylinux2014"
export CIBW_ENVIRONMENT="VERSION=\"${VERSION}\""
export CIBW_TEST_REQUIRES="pytest"
export CIBW_TEST_COMMAND="pytest {project}/python/tests"
python -m cibuildwheel --output-dir wheelhouse
if [ "$(uname -m)" = "x86_64" ]; then
# Build sdist only once, to avoid duplicate uploads from matrix jobs.
python -m build --sdist --outdir wheelhouse
fi
if [ "$1" != "testonly" ]; then
# Upload to PyPI
python -m twine upload wheelhouse/*
fi