Skip to content

Commit

Permalink
ci: Generate Python package with cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviermartin committed Feb 22, 2024
1 parent 18e1658 commit cd3b35b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: ./ci/generate-python-package.sh
env:
CIBW_BEFORE_BUILD_LINUX: "./ci/install-bluez.sh"
- name: Archive Python packages
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions ci/generate-python-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ include CrossCompilation.cmake
EOT

# Install requirements
python3 -m pip install wheel
python3 -m pip install cibuildwheel==2.16.5

# Generate packages
pushd ${gattlib_py_package_dir}

# Binary package
python3 setup.py bdist_wheel
python3 -m cibuildwheel --output-dir dist

# Source package
python setup.py sdist
Expand Down
19 changes: 19 additions & 0 deletions ci/install-bluez.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Exit immediately if a command exits with a non-zero status.
set -e

# Install dependencies
yum -y install wget dbus-devel

#
#
#
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.66.tar.xz
tar -xf bluez-5.66.tar.xz
pushd bluez-5.66
./configure --prefix=/usr --disable-obex --disable-udev --disable-cups --disable-client --disable-manpages --disable-tools --disable-obex --disable-monitor --disable-hog --disable-hid --disable-network --disable-a2dp --disable-avrcp --disable-bap --disable-mcp --disable-vcp --enable-library
make
make install
popd
rm -Rf bluez-5.66

0 comments on commit cd3b35b

Please sign in to comment.