From 744be0aa983199a771bc1d31d0ee12e8d890e623 Mon Sep 17 00:00:00 2001 From: Johannes Laurin Hoermann Date: Mon, 20 Nov 2023 10:52:19 +0100 Subject: [PATCH] CI: switch to setup.py-less pyproject.toml-only build --- .github/workflows/build-and-publish.yml | 9 ++------- .github/workflows/build-installer-on-windows.yml | 2 +- .github/workflows/build-on-macos.yml | 2 +- .github/workflows/build-on-ubuntu.yml | 2 +- .github/workflows/build-on-windows.yml | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index cbe93dc8..b94a61c1 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -54,14 +54,9 @@ jobs: pip install wheel pip install -r requirements.txt - - name: Build and install - run: | - python setup.py build - python setup.py install - - name: Package distribution run: | - python setup.py sdist bdist_wheel + python -m build --sdist --wheel ls -1 dist/ - name: Get master HEAD SHA @@ -114,7 +109,7 @@ jobs: id: fix_version run: | pip install setuptools_scm - version=$(SETUPTOOLS_SCM_DEBUG=1 python setup.py --version) + version=$(SETUPTOOLS_SCM_DEBUG=1 python -m setuptools_scm) echo "::set-output name=version::$(echo $version)" - name: Download Linux build diff --git a/.github/workflows/build-installer-on-windows.yml b/.github/workflows/build-installer-on-windows.yml index a727de01..7de94fbe 100644 --- a/.github/workflows/build-installer-on-windows.yml +++ b/.github/workflows/build-installer-on-windows.yml @@ -109,7 +109,7 @@ jobs: - name: Fix setuptools_scm-generated version id: fix_version run: | - version=$(SETUPTOOLS_SCM_DEBUG=1 python setup.py --version) # have version written to file to appear in bundled app as well + version=$(SETUPTOOLS_SCM_DEBUG=1 python -m setuptools_scm) # have version written to file to appear in bundled app as well echo "::set-output name=version::$(echo $version)" - name: Create local venv diff --git a/.github/workflows/build-on-macos.yml b/.github/workflows/build-on-macos.yml index 50e4bf82..62ae9f4f 100644 --- a/.github/workflows/build-on-macos.yml +++ b/.github/workflows/build-on-macos.yml @@ -49,7 +49,7 @@ jobs: id: fix_version run: | source venv/bin/activate - version=$(SETUPTOOLS_SCM_DEBUG=1 python setup.py --version) # have version written to file to appear in bundled app as well + version=$(SETUPTOOLS_SCM_DEBUG=1 python -m setuptools_scm) # have version written to file to appear in bundled app as well echo "::set-output name=version::$(echo $version)" - name: Log python package info diff --git a/.github/workflows/build-on-ubuntu.yml b/.github/workflows/build-on-ubuntu.yml index 4894661c..b4a7aa06 100644 --- a/.github/workflows/build-on-ubuntu.yml +++ b/.github/workflows/build-on-ubuntu.yml @@ -59,7 +59,7 @@ jobs: - name: Fix setuptools_scm-generated version id: fix_version run: | - version=$(SETUPTOOLS_SCM_DEBUG=1 python setup.py --version) # have version written to file to appear in bundled app as well + version=$(SETUPTOOLS_SCM_DEBUG=1 python -m setuptools_scm) # have version written to file to appear in bundled app as well echo "::set-output name=version::$(echo $version)" - name: Log python package info diff --git a/.github/workflows/build-on-windows.yml b/.github/workflows/build-on-windows.yml index 1114a8d8..e714d6a7 100644 --- a/.github/workflows/build-on-windows.yml +++ b/.github/workflows/build-on-windows.yml @@ -109,7 +109,7 @@ jobs: - name: Fix setuptools_scm-generated version id: fix_version run: | - version=$(SETUPTOOLS_SCM_DEBUG=1 python setup.py --version) # have version written to file to appear in bundled app as well + version=$(SETUPTOOLS_SCM_DEBUG=1 python -m setuptools_scm) # have version written to file to appear in bundled app as well echo "::set-output name=version::$(echo $version)" - name: Create local venv