From 4c9ad96a491e58c816bd87cc4b5bce9b05126897 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Wed, 18 Dec 2024 19:47:01 -0500 Subject: [PATCH] use flit to handle PEP-517 build-system requirements --- .gitignore | 3 +++ pyproject.toml | 4 ++++ rpm/{buzon.spec => python-buzon.spec} | 19 ++++++++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) rename rpm/{buzon.spec => python-buzon.spec} (68%) diff --git a/.gitignore b/.gitignore index c18dd8d..8ebdc17 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ __pycache__/ +dist/ +build/ +*.egg-info/ diff --git a/pyproject.toml b/pyproject.toml index 5da794c..428469a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/rpm/buzon.spec b/rpm/python-buzon.spec similarity index 68% rename from rpm/buzon.spec rename to rpm/python-buzon.spec index b3ccb9d..880c4a8 100644 --- a/rpm/buzon.spec +++ b/rpm/python-buzon.spec @@ -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 -- 2.43.5