3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module zope.testing
8 Summary: Support for different testing frameworks
9 Summary(pl.UTF-8): Obsługa różnych szkieletów testowych
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/zope-testing/
16 Source0: https://files.pythonhosted.org/packages/source/z/zope.testing/zope.testing-%{version}.tar.gz
17 # Source0-md5: 35d3b8a163874bfc18a084534b52e186
18 URL: https://www.zope.org/
20 BuildRequires: python >= 1:2.7
21 BuildRequires: python-devel >= 1:2.7
24 BuildRequires: python3-devel >= 1:3.5
25 BuildRequires: python3-modules >= 1:3.5
26 BuildRequires: python3-setuptools
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.714
30 Requires: python-modules >= 1:2.7
31 Requires: python-zope-base
32 Obsoletes: Zope-Testing < 4
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 This package provides a number of testing frameworks. It supports both
40 %description -l pl.UTF-8
41 Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
42 doctest jak i unittest.
44 %package -n python3-%{module}
45 Summary: Support for different testing frameworks
46 Summary(pl.UTF-8): Obsługa różnych szkieletów testowych
47 Group: Libraries/Python
48 Requires: python3-modules >= 1:3.5
49 Requires: python3-zope-base
51 %description -n python3-%{module}
52 This package provides a number of testing frameworks. It supports both
55 %description -n python3-%{module} -l pl.UTF-8
56 Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
57 doctest jak i unittest.
60 %setup -q -n %{module}-%{version}
64 %py_build %{?with_tests:test}
68 %py3_build %{?with_tests:test}
72 rm -rf $RPM_BUILD_ROOT
76 --install-purelib=%{py_sitescriptdir}
80 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
85 --install-purelib=%{py3_sitescriptdir}
88 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
92 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
98 %{py_sitescriptdir}/zope/testing
99 %{py_sitescriptdir}/zope.testing-%{version}-py*.egg-info
100 %{py_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
106 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
107 %{py3_sitescriptdir}/zope/testing
108 %{py3_sitescriptdir}/zope.testing-%{version}-py*.egg-info
109 %{py3_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth