From 5762391ab07794e9c93cc56588e7bf17d54b05b8 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 12 Sep 2023 22:24:40 -0400 Subject: [PATCH 1/4] Add a pyproject.toml for the Python bindings This is needed for modern Python building/packaging (ie, invoking setup.py directly is now deprecated). --- libconcord/bindings/python/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 libconcord/bindings/python/pyproject.toml diff --git a/libconcord/bindings/python/pyproject.toml b/libconcord/bindings/python/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/libconcord/bindings/python/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" From 3d24152283a4db81a68e034d53d6b43168573566 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 12 Sep 2023 23:15:46 -0400 Subject: [PATCH 2/4] Update CI to use modern Python build/install --- .github/workflows/ci-linux.yml | 9 ++++++--- .github/workflows/ci-macos.yml | 9 ++++++--- .github/workflows/ci-windows.yml | 6 +++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 0ac9e06..ef909e1 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -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 @@ -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 diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 18085eb..9e5d46a 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -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 @@ -18,7 +20,8 @@ jobs: - name: Build libconcord Python bindings run: | cd libconcord/bindings/python - sudo python3 setup.py install + python3 -m build + pip3 install dist/*.whl python3 -c 'import libconcord; print(libconcord)' cd - - name: Build concordance diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 66f1e66..2b0d8c3 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -5,7 +5,7 @@ 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 - name: Build libconcord @@ -28,7 +28,7 @@ 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 @@ -36,7 +36,7 @@ jobs: needs: build runs-on: windows-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 id: download with: name: windows-installer From 595f890f833910944b7bfc88ee65d91663108ae8 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Wed, 13 Sep 2023 18:04:42 -0400 Subject: [PATCH 3/4] Fix CI on macOS Closes #51. --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 9e5d46a..7c34d80 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -22,7 +22,7 @@ jobs: cd libconcord/bindings/python python3 -m build pip3 install dist/*.whl - python3 -c 'import libconcord; print(libconcord)' + DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib python3 -c 'import libconcord; print(libconcord)' cd - - name: Build concordance run: | From 677091912ef6a4f01dc3138c06e08aed2eb2739f Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Wed, 13 Sep 2023 18:29:18 -0400 Subject: [PATCH 4/4] Fix CI on Windows --- .github/workflows/ci-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 2b0d8c3..6a62d5d 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -7,7 +7,7 @@ jobs: steps: - 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