use flit to handle PEP-517 build-system requirements

This commit is contained in:
Neil Hanlon 2024-12-18 19:47:01 -05:00
parent ff26bd87f2
commit 4c9ad96a49
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
3 changed files with 21 additions and 5 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
__pycache__/
dist/
build/
*.egg-info/

View File

@ -28,3 +28,7 @@ file = "LICENSE"
[tool.setuptools]
package-dir = { "buzon" = "buzon" }
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

View File

@ -1,23 +1,32 @@
Name: buzon
%global pyname buzon
Name: python-%{pyname}
Version: 0.1.0
Release: 1%{?dist}
Summary: MQTT Webhook Delivery Service
License: GPLv3
URL: https://git.resf.org/infrastructure/buzon
Source0: %{name}-%{version}.tar.gz
Source0: %{url}/archive/%{pyname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: pyproject-rpm-macros
BuildRequires: systemd-rpm-macros
Requires: (python3dist(uvicorn) with /usr/bin/uvicorn)
%description
%global _description %{expand:
Buzon is a webhook system designed to receive messages from a forgejo instance
and then send it to an MQTT-aware endpoint.
and then send it to an MQTT-aware endpoint.}
%description %_description
%package -n python3-buzon
Summary: %{summary}
%description -n python3-buzon %_description
%prep
%autosetup -n %{name}-%{version} -p1
%autosetup -n buzon-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires