Deduplicate summary and description

This commit is contained in:
Carl George 2019-03-05 09:52:04 -06:00
parent d90bf057fd
commit 4bd792e272

View File

@ -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