From d451e7cab6ac55eac8ae3b19cccc0cb63e3764bd Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Thu, 21 May 2026 17:32:45 +0200 Subject: [PATCH 1/4] ci: add pypi deployment --- .github/workflows/wheels.yml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 00000000..151bf7e2 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,46 @@ +name: Build wheels + +on: [push] + +jobs: + build: + name: Build wheels + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: 3.14 + - name: Install build + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build + run: + python3 -m build + + - uses: actions/upload-artifact@v7 + with: + name: package-dist + path: dist + + upload: + name: Upload wheels and sdist + runs-on: ubuntu-latest + + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + needs: [build] + environment: + name: pypi + url: https://pypi.org/p/basil-daq/ + permissions: + id-token: write + + steps: + - uses: actions/download-artifact@v8 + with: + name: package-dist + path: dist + - uses: pypa/gh-action-pypi-publish@release/v1 From aedebe6031b13d9b236dcfee6f0feadb64285361 Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Thu, 15 Oct 2026 14:03:45 +0200 Subject: [PATCH 2/4] Prepare package metadata for PyPI release - Use SPDX license expression and license-files (requires setuptools >= 77) - Shorten description to a single line (newlines are deprecated in Summary) - Drop outdated PyPI note and inactive CERN mailing list from README --- README.md | 4 ---- pyproject.toml | 7 ++++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2e3b50c7..5745a23e 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,6 @@ Install via PyPI: pip install basil-daq ``` -> **Note:** The PyPI package may be outdated. Installing from source (below) is recommended to get the latest version. - Or install from source: ```bash @@ -40,8 +38,6 @@ pip install -e . Please use GitHub's [issue tracker](https://github.com/SiLab-Bonn/basil/issues) for bug reports/feature requests/questions. -*For CERN users*: Feel free to subscribe to the [basil mailing list](https://e-groups.cern.ch/e-groups/EgroupsSubscription.do?egroupName=basil-devel). - ## Documentation Documentation can be found at: https://basil.rtfd.org diff --git a/pyproject.toml b/pyproject.toml index f8cbdbf4..77ceb3a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,13 @@ [build-system] -requires = ["setuptools >= 61.0"] +requires = ["setuptools >= 77.0"] build-backend = "setuptools.build_meta" [project] name = "basil_daq" dynamic = ["version"] -license = { "text" = "BSD 3-Clause ('BSD New' or 'BSD Simplified') License" } -description = "Basil is a modular data acquisition system and system testing framework in Python.\nIt also provides generic FPGA firmware modules for different hardware platforms and drivers for wide range of lab appliances." +license = "BSD-3-Clause" +license-files = ["LICENSE.txt"] +description = "Basil is a modular data acquisition system and system testing framework in Python." readme = "README.md" requires-python = ">=3.10,<3.15" authors = [ From f4857e4faa2ac5ff31a92edff7111ff25c057251 Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Thu, 15 Oct 2026 14:08:30 +0200 Subject: [PATCH 3/4] ci: check that release tag matches package version --- .github/workflows/wheels.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 151bf7e2..e4060b7f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -43,4 +43,13 @@ jobs: with: name: package-dist path: dist + - name: Check tag matches package version + run: | + TAG_VERSION="${GITHUB_REF_NAME#v}" + for f in dist/*.whl dist/*.tar.gz; do + case "$(basename "$f")" in + basil_daq-"$TAG_VERSION"-*.whl|basil_daq-"$TAG_VERSION".tar.gz) ;; + *) echo "::error::$f does not match tag $GITHUB_REF_NAME"; exit 1 ;; + esac + done - uses: pypa/gh-action-pypi-publish@release/v1 From 514d1f4c5213e6db86ab014383ef858d91397fd4 Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Thu, 15 Oct 2026 14:11:42 +0200 Subject: [PATCH 4/4] ci: update checkout and setup-python actions to v7 --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e4060b7f..a1100649 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -7,11 +7,11 @@ jobs: name: Build wheels runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: - python-version: 3.14 + python-version: "3.14" - name: Install build run: | python -m pip install --upgrade pip