From c68ac9411c3556807842796305cfb7bd2cbaf49a Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 29 Dec 2019 19:20:12 +0100 Subject: [PATCH] - updated to 4.3 --- python-zope.exceptions.spec | 86 ++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 20 deletions(-) diff --git a/python-zope.exceptions.spec b/python-zope.exceptions.spec index 68efa1a..56fd481 100644 --- a/python-zope.exceptions.spec +++ b/python-zope.exceptions.spec @@ -1,44 +1,75 @@ # # Conditional build: +%bcond_without doc # Sphinx documentation +%bcond_with tests # unit tests %bcond_without python2 # CPython 2.x module %bcond_without python3 # CPython 3.x module %define module zope.exceptions Summary: Zope Exceptions +Summary(pl.UTF-8): Zope Exceptions - wyjątki Zope Name: python-%{module} -Version: 4.0.8 -Release: 4 -License: ZPL 2.1 +Version: 4.3 +Release: 1 +License: ZPL v2.1 Group: Libraries/Python -Source0: https://pypi.python.org/packages/8f/b7/eba9eca6841fa47d9a30f71a602be7615bff4f8e11f85c2840b88a77c68a/zope.exceptions-4.0.8.tar.gz -# Source0-md5: c6f9b3905a48ba0487f82d95fba71c0c -URL: http://www.zope.org/ -BuildRequires: rpm-pythonprov -BuildRequires: rpmbuild(macros) >= 1.710 +#Source0Download: https://pypi.org/simple/zope-exceptions/ +Source0: https://files.pythonhosted.org/packages/source/z/zope.exceptions/zope.exceptions-%{version}.tar.gz +# Source0-md5: fac94f92c787cf9870e9e3fdfe247aa4 +URL: https://www.zope.org/ %if %{with python2} -BuildRequires: python >= 1:2.6 +BuildRequires: python >= 1:2.7 BuildRequires: python-setuptools +%if %{with tests} +BuildRequires: python-zope.interface +BuildRequires: python-zope.testrunner +%endif %endif %if %{with python3} -BuildRequires: python3 +BuildRequires: python3 >= 1:3.4 BuildRequires: python3-setuptools +%if %{with tests} +BuildRequires: python3-zope.interface +BuildRequires: python3-zope.testrunner %endif -%pyrequires_eq python-modules +%endif +BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 1.714 +%if %{with doc} +BuildRequires: sphinx-pdg-3 +BuildRequires: python3-repoze.sphinx.autointerface +%endif +Requires: python-modules >= 1:2.7 +Requires: python-zope-base Obsoletes: Zope-Exceptions BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -This package contains exception exceptions and implementations which are so -general purpose that they don’t belong in Zope application-specific packages. +This package contains exception exceptions and implementations which +are so general purpose that they don't belong in Zope +application-specific packages. + +%description -l pl.UTF-8 +Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na +tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope +specyficznych dla aplikacji. %package -n python3-%{module} Summary: Zope Exceptions +Summary(pl.UTF-8): Zope Exceptions - wyjątki Zope Group: Libraries/Python -Requires: python3-modules +Requires: python3-modules >= 1:3.4 +Requires: python3-zope-base %description -n python3-%{module} -This package contains exception exceptions and implementations which are so -general purpose that they don’t belong in Zope application-specific packages. +This package contains exception exceptions and implementations which +are so general purpose that they don't belong in Zope +application-specific packages. + +%description -n python3-%{module} -l pl.UTF-8 +Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na +tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope +specyficznych dla aplikacji. %prep %setup -q -n zope.exceptions-%{version} @@ -46,10 +77,23 @@ general purpose that they don’t belong in Zope application-specific packages. %build %if %{with python2} %py_build + +%if %{with tests} +%{__python} -m zope.testrunner --test-path=src +%endif %endif %if %{with python3} %py3_build + +%if %{with tests} +%{__python3} -m zope.testrunner --test-path=src +%endif +%endif + +%if %{with doc} +%{__make} -C docs html \ + SPHINXBUILD=sphinx-build-2 %endif %install @@ -72,15 +116,17 @@ rm -rf $RPM_BUILD_ROOT %if %{with python2} %files %defattr(644,root,root,755) +%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst %{py_sitedir}/zope/exceptions -%{py_sitedir}/zope.exceptions-*.egg-info -%{py_sitedir}/zope.exceptions-*-nspkg.pth +%{py_sitedir}/zope.exceptions-%{version}-py*.egg-info +%{py_sitedir}/zope.exceptions-%{version}-py*-nspkg.pth %endif %if %{with python3} %files -n python3-%{module} %defattr(644,root,root,755) +%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst %{py3_sitedir}/zope/exceptions -%{py3_sitedir}/zope.exceptions-*.egg-info -%{py3_sitedir}/zope.exceptions-*-nspkg.pth +%{py3_sitedir}/zope.exceptions-%{version}-py*.egg-info +%{py3_sitedir}/zope.exceptions-%{version}-py*-nspkg.pth %endif -- 2.44.0