diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 00000000..a1100649 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,55 @@ +name: Build wheels + +on: [push] + +jobs: + build: + name: Build wheels + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Setup Python + uses: actions/setup-python@v7 + 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 + - 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 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 = [