From f044a66a3525299e44d4558a4fed7cf9066376dd Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Fri, 11 Apr 2025 05:34:41 +0300 Subject: [PATCH] build: switch to new python meson backend Fixes #976 Signed-off-by: Boris Glimcher --- .github/workflows/release-python.yml | 3 +++ pyproject.toml | 33 ++++++++++++++++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 5fabd07a5..7ecb952c3 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -25,6 +25,9 @@ jobs: - name: Build sdist run: pipx run build --sdist + - name: Validate sdist + run: pipx run twine check dist/*.tar.gz + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz diff --git a/pyproject.toml b/pyproject.toml index 0f661c8eb..4dff97d9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,22 @@ # SPDX-License-Identifier: LGPL-2.1-or-later [build-system] -requires = ["mesonpep517", "wheel", "meson", "ninja"] # PEP 508 specifications. -build-backend = "mesonpep517.buildapi" +build-backend = 'mesonpy' +requires = ['meson-python'] + +[project] +name = "libnvme" +dynamic = ["version"] +description = "python bindings for libnvme" +readme = "README.md" +requires-python = ">=3.6" +license = { text = "LGPL-2.1-or-later" } + +authors = [ + { name = "Hannes Reinecke", email = "hare@suse.de" } +] + +keywords = ["nvme", "storage", "bindings"] -[tool.mesonpep517.metadata] -author="Hannes Reinecke" -author-email="hare@suse.de" classifiers = [ "Intended Audience :: Developers", "Development Status :: 5 - Production/Stable", @@ -13,10 +24,10 @@ classifiers = [ "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", ] -description="Provides library functions for accessing and managing nvme devices on a Linux system." -description-file="README.md" -home-page = "https://github.com/linux-nvme/libnvme" -license="LGPL-2.1-or-later" -requires-python=">=3.6" -summary="python bindings for libnvme" +dependencies = [] + +[project.urls] +"Homepage" = "https://github.com/linux-nvme/libnvme" +"Source" = "https://github.com/linux-nvme/libnvme" +"Bug Tracker" = "https://github.com/linux-nvme/libnvme/issues"