From 4bd792e272c9c046c7fad917fe835aa983c938b1 Mon Sep 17 00:00:00 2001 From: Carl George Date: Tue, 5 Mar 2019 09:52:04 -0600 Subject: [PATCH] Deduplicate summary and description --- python-pid.spec | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/python-pid.spec b/python-pid.spec index 52b1b8c..384879f 100644 --- a/python-pid.spec +++ b/python-pid.spec @@ -1,5 +1,15 @@ %global srcname pid +%global common_description %{expand: +pid provides a PidFile class that manages PID files. PidFile features: + - stale detection + - locking using fcntl + - chmod (default is 0o644) + - chown + - custom exceptions + +PidFile can also be used as a context manager or a decorator.} + # Build python3 for EPEL7, but not 6 %if 0%{?rhel} && 0%{?rhel} < 7 %bcond_with python3 @@ -29,19 +39,11 @@ Patch0: python-pid-remove-nose-requirement.patch BuildArch: noarch -%description -pid provides a PidFile class that manages PID files. PidFile features: - - stale detection - - locking using fcntl - - chmod (default is 0o644) - - chown - - custom exceptions - -PidFile can also be used as a context manager or a decorator. +%description %{common_description} %if %{with python2} %package -n python2-%{srcname} -Summary: PID file management library +Summary: %{summary} BuildRequires: python-devel BuildRequires: python-setuptools @@ -49,20 +51,12 @@ BuildRequires: python-nose %{?python_provide:%python_provide python2-%{srcname}} -%description -n python2-%{srcname} -pid provides a PidFile class that manages PID files. PidFile features: - - stale detection - - locking using fcntl - - chmod (default is 0o644) - - chown - - custom exceptions - -PidFile can also be used as a context manager or a decorator. +%description -n python2-%{srcname} %{common_description} %endif %if %{with python3} %package -n python%{python3_pkgversion}-%{srcname} -Summary: PID file management library +Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools @@ -70,15 +64,7 @@ BuildRequires: python%{python3_pkgversion}-nose %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} -%description -n python%{python3_pkgversion}-%{srcname} -pid provides a PidFile class that manages PID files. PidFile features: - - stale detection - - locking using fcntl - - chmod (default is 0o644) - - chown - - custom exceptions - -PidFile can also be used as a context manager or a decorator. +%description -n python%{python3_pkgversion}-%{srcname} %{common_description} %endif %prep