summaryrefslogtreecommitdiff
path: root/.github/workflows/build-manylinux-wheels.sh
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2020-04-22 18:11:47 -0700
committerElvis Pranskevichus <elvis@magic.io>2020-04-22 18:51:13 -0700
commit85af8df6b15dd57d391880fe76f8a5324385cd13 (patch)
tree14d010e45c5f527dc61b153beee930f95ec8a792 /.github/workflows/build-manylinux-wheels.sh
parent60252260070137dd75f09d99a50c5dc624dea439 (diff)
downloadimmutables-4607cffacf494c4a14187dec9c07f13bface12d9.tar.gz
immutables-4607cffacf494c4a14187dec9c07f13bface12d9.zip
Add Github release workflowv0.12
Diffstat (limited to '.github/workflows/build-manylinux-wheels.sh')
-rwxr-xr-x.github/workflows/build-manylinux-wheels.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/.github/workflows/build-manylinux-wheels.sh b/.github/workflows/build-manylinux-wheels.sh
new file mode 100755
index 0000000..53ed6d3
--- /dev/null
+++ b/.github/workflows/build-manylinux-wheels.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e -x
+
+PY_MAJOR=${PYTHON_VERSION%%.*}
+PY_MINOR=${PYTHON_VERSION#*.}
+
+ML_PYTHON_VERSION="cp${PY_MAJOR}${PY_MINOR}-cp${PY_MAJOR}${PY_MINOR}"
+if [ "${PY_MAJOR}" -lt "4" -a "${PY_MINOR}" -lt "8" ]; then
+ ML_PYTHON_VERSION+="m"
+fi
+
+# Compile wheels
+PYTHON="/opt/python/${ML_PYTHON_VERSION}/bin/python"
+PIP="/opt/python/${ML_PYTHON_VERSION}/bin/pip"
+"${PIP}" install --upgrade setuptools pip wheel
+cd "${GITHUB_WORKSPACE}"
+make clean
+"${PYTHON}" setup.py bdist_wheel
+
+# Bundle external shared libraries into the wheels.
+for whl in "${GITHUB_WORKSPACE}"/dist/*.whl; do
+ auditwheel repair $whl -w "${GITHUB_WORKSPACE}"/dist/
+ rm "${GITHUB_WORKSPACE}"/dist/*-linux_*.whl
+done