Skip to content

Commit

Permalink
Merge branch 'master' of github.com:keystone-engine/keystone
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Jun 14, 2020
2 parents 9d36a39 + e405f7b commit ceb5df4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ jobs:
publish:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags')
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: Publish distribution 📦 to test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.testpypi_pass }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution 📦 to PyPI
if: ${{ success() }}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down
29 changes: 10 additions & 19 deletions bindings/python/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
#!/bin/bash
set -e -x

cd /work/bindings/python

sudo rm /usr/bin/python && sudo ln -s /opt/python/cp36-cp36m/bin/python /usr/bin/python; python -V

function repair_wheel {
wheel="$1"
if ! auditwheel show "$wheel"; then
echo "Skipping non-platform wheel $wheel"
else
auditwheel repair "$wheel" -w /work/bindings/python/dist/
fi
}

cd bindings/python
sudo rm /usr/bin/python && sudo ln -s /opt/python/cp27-cp27m/bin/python /usr/bin/python; python -V

# Compile wheels
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel -d wheelhouse

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
repair_wheel "$whl"
done
if [ -f /opt/python/cp36-cp36m/bin/python ];then
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel
else
python3 setup.py bdist_wheel
fi
cd dist
auditwheel repair *.whl
mv -f wheelhouse/*.whl .
2 changes: 2 additions & 0 deletions bindings/python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[metadata]
description-file = README.pypi-src
[bdist_wheel]
universal = 1

0 comments on commit ceb5df4

Please sign in to comment.