Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyproject.toml for the Python bindings (and fix CI) #52

Merged
merged 4 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install libcurl4-openssl-dev libhidapi-dev libzip-dev
run: |
sudo apt-get install libcurl4-openssl-dev libhidapi-dev libzip-dev
pip install build
- name: Build libconcord
run: |
cd libconcord
Expand All @@ -19,7 +21,8 @@ jobs:
- name: Build libconcord Python bindings
run: |
cd libconcord/bindings/python
sudo python3 setup.py install
python3 -m build
pip install dist/*.whl
python3 -c 'import libconcord; print(libconcord)'
cd -
- name: Build concordance
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install autoconf automake hidapi libzip
run: |
brew install autoconf automake hidapi libzip
pip3 install build
- name: Build libconcord
run: |
cd libconcord
Expand All @@ -18,8 +20,9 @@ jobs:
- name: Build libconcord Python bindings
run: |
cd libconcord/bindings/python
sudo python3 setup.py install
python3 -c 'import libconcord; print(libconcord)'
python3 -m build
pip3 install dist/*.whl
DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib python3 -c 'import libconcord; print(libconcord)'
cd -
- name: Build concordance
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ jobs:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: dnf install -y autoconf automake diffutils libtool mingw32-curl mingw32-gcc-c++ mingw32-hidapi mingw32-libzip mingw32-nsis python3-pip python3-wheel
run: dnf install -y autoconf automake diffutils libtool mingw32-curl mingw32-gcc-c++ mingw32-hidapi mingw32-libstdc++ mingw32-libzip mingw32-nsis python3-pip python3-wheel
- name: Build libconcord
run: |
cd libconcord
Expand All @@ -28,15 +28,15 @@ jobs:
run: |
pip install mingw-ldd
MINGW_SYSROOT_BIN="/usr/i686-w64-mingw32/sys-root/mingw/bin" concordance/win/make_installer.py
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: windows-installer
path: concordance/win/concordance-installer.exe
test:
needs: build
runs-on: windows-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
id: download
with:
name: windows-installer
Expand Down
3 changes: 3 additions & 0 deletions libconcord/bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"