%global pypi_name sdnotify Name: python-%{pypi_name} Version: 0.3.2 Release: 4%{?dist} Summary: Implementation of systemd's service notification protocol License: MIT URL: https://github.com/bb4242/sdnotify Source0: https://github.com/bb4242/sdnotify/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools # Do not build the Python3 packages for RHEL/CentOS %if 0%{?fedora}%{?rhel} > 7 BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description 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. %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} 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. %if 0%{?fedora}%{?rhel} > 7 %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} 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. %endif %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?fedora}%{?rhel} > 7 %py3_build %endif %install %py2_install %if 0%{?fedora}%{?rhel} > 7 %py3_install %endif %files -n python2-%{pypi_name} %license LICENSE.txt %doc README.md %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?fedora}%{?rhel} > 7 %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.md %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Fri Nov 30 2018 Lars Kiesow 0.3.2-2 - Prepare RHEL 7 build * Thu Aug 16 2018 Lars Kiesow 0.3.2-1 - Initial build