From f6fb726aaea5125bd631e47d195f93d38e5643df Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Wed, 25 Jan 2023 17:32:13 -0500 Subject: [PATCH] Initial package commit with changes from review --- .copr/Makefile | 14 ++++++++++++ .gitignore | 3 +++ python-sdnotify.spec | 51 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 69 insertions(+) create mode 100644 .copr/Makefile create mode 100644 .gitignore create mode 100644 python-sdnotify.spec create mode 100644 sources diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..019eea2 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,14 @@ +rpmbuild_src = $(shell rpmbuild --eval '%{_sourcedir}') +.PHONY: prepare srpm rpm + +prepare: + dnf -y install rpmdevtools rpm-build + cp *.patch $(rpmbuild_src) || true + spectool -g -R $(spec) + + +srpm: prepare + rpmbuild -bs --define "_srcrpmdir $(outdir)" $(spec) + +rpm: prepare + rpmbuild -bb --define "_rpmdir $(outdir)" $(spec) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a12e377 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +rpmbuild/ +*.tar.gz +*.tgz diff --git a/python-sdnotify.spec b/python-sdnotify.spec new file mode 100644 index 0000000..ff2299e --- /dev/null +++ b/python-sdnotify.spec @@ -0,0 +1,51 @@ +Name: python-sdnotify +Version: 0.3.2 +Release: %autorelease +License: MIT +Summary: A pure Python implementation of systemd's service notification protocol +URL: https://github.com/bb4242/sdnotify +Source0: %{pypi_source sdnotify} +BuildArch: noarch + +BuildRequires: python3-devel + +Requires: systemd + +%global _description %{expand: +This is a pure Python implementation of the systemd sd_notify protocol. This +protocol can be used to inform systemd about service start-up completion, +watchdog events, and other service status changes. Thus, this package can be +used to write system services in Python that play nicely with systemd. sdnotify +is compatible with both Python 2 and Python 3. +} + +%description %_description + +%package -n python3-sdnotify +Summary: %{summary} + +%description -n python3-sdnotify %_description + +%prep +%autosetup -n sdnotify-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files sdnotify + +%check +# NOTE(neil) - 2023-01-25 upstream does not provide any tests yet +%pyproject_check_import + +%files -n python3-sdnotify -f %{pyproject_files} +%license LICENSE.txt + +%changelog +%autochangelog + diff --git a/sources b/sources new file mode 100644 index 0000000..c609b2a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +73977fc746b36cc41184dd43c3fe81323e7b8b06c2bb0826c4f59a20c56bb9f1 SOURCES/sdnotify-0.3.2.tar.gz