From 1812431136db0e8caf315614e0ccf0b164545baf Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sep 12 2019 16:39:09 +0000 Subject: python: recommend %{expand:} trick to avoid duplicating description Also fix "an python". --- diff --git a/guidelines/modules/ROOT/examples/python-example.spec b/guidelines/modules/ROOT/examples/python-example.spec index 9eee928..aae8769 100644 --- a/guidelines/modules/ROOT/examples/python-example.spec +++ b/guidelines/modules/ROOT/examples/python-example.spec @@ -11,16 +11,18 @@ Source0: %{pypi_source} BuildArch: noarch -%description -An python module which provides a convenient example. +%global _description %{expand: +A python module which provides a convenient example. This is the +rest of of the description that provides more details.} + +%description %_description %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-devel %{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{srcname} -An python module which provides a convenient example. +%description -n python3-%{srcname} %_description %prep %autosetup -n %{srcname}-%{version} diff --git a/guidelines/modules/ROOT/pages/Python_Appendix.adoc b/guidelines/modules/ROOT/pages/Python_Appendix.adoc index 94f6d70..6d5ca97 100644 --- a/guidelines/modules/ROOT/pages/Python_Appendix.adoc +++ b/guidelines/modules/ROOT/pages/Python_Appendix.adoc @@ -51,16 +51,17 @@ Source0: %pypi_source BuildArch: noarch -%description -An python module which provides a convenient example. +%global _description %{expand: +A python module which provides a convenient example.} + +%description %_description %package -n python2-%{srcname} Summary: %{summary} BuildRequires: python2-devel %{?python_provide:%python_provide python2-%{srcname}} -%description -n python2-%{srcname} -An python module which provides a convenient example. +%description -n python2-%{srcname} %_description %package -n python3-%{srcname} @@ -68,8 +69,7 @@ Summary: %{summary} BuildRequires: python3-devel %{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{srcname} -An python module which provides a convenient example. +%description -n python3-%{srcname} %_description %prep @@ -210,10 +210,10 @@ Source0: %pypi_source BuildArch: noarch +%global _description %{expand: +A python module which provides a convenient example.} -%description -An python module which provides a convenient example. - +%description %_description %if %{with python2} %package -n python2-%{srcname} @@ -221,8 +221,7 @@ Summary: %{summary} BuildRequires: python2-devel %{?python_provide:%python_provide python2-%{srcname}} -%description -n python2-%{srcname} -An python module which provides a convenient example. +%description -n python2-%{srcname} %_description %endif @@ -231,8 +230,7 @@ Summary: %{summary} BuildRequires: python3-devel %{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{srcname} -An python module which provides a convenient example. +%description -n python3-%{srcname} %_description %prep