]> git.pld-linux.org Git - packages/python-zope.testing.git/blame - python-zope.testing.spec
rebuild with python 3.10
[packages/python-zope.testing.git] / python-zope.testing.spec
CommitLineData
3693e166 1#
20ca8d44 2# Conditional build:
3693e166 3%bcond_without tests # unit tests
20ca8d44
JR
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
5626eed1 7%define module zope.testing
010232c6 8Summary: Support for different testing frameworks
1b7c18e0 9Summary(pl.UTF-8): Obsługa różnych szkieletów testowych
5626eed1 10Name: python-%{module}
6a6742d2 11Version: 4.9
786ba62a 12Release: 2
3693e166 13License: ZPL v2.1
010232c6 14Group: Libraries/Python
3693e166
JB
15#Source0Download: https://pypi.org/simple/zope-testing/
16Source0: https://files.pythonhosted.org/packages/source/z/zope.testing/zope.testing-%{version}.tar.gz
6a6742d2 17# Source0-md5: 35d3b8a163874bfc18a084534b52e186
3693e166 18URL: https://www.zope.org/
20ca8d44 19%if %{with python2}
3693e166
JB
20BuildRequires: python >= 1:2.7
21BuildRequires: python-devel >= 1:2.7
20ca8d44
JR
22%endif
23%if %{with python3}
94a9ebeb
JB
24BuildRequires: python3-devel >= 1:3.5
25BuildRequires: python3-modules >= 1:3.5
20ca8d44
JR
26BuildRequires: python3-setuptools
27%endif
1b7c18e0 28BuildRequires: rpm-pythonprov
3693e166
JB
29BuildRequires: rpmbuild(macros) >= 1.714
30Requires: python-modules >= 1:2.7
31Requires: python-zope-base
6fc855a8 32Obsoletes: Zope-Testing < 4
68c17400 33BuildArch: noarch
6cceccf3 34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
3693e166
JB
37This package provides a number of testing frameworks. It supports both
38doctest and unittest.
1b7c18e0
JB
39
40%description -l pl.UTF-8
3693e166
JB
41Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
42doctest jak i unittest.
6cceccf3 43
20ca8d44 44%package -n python3-%{module}
3693e166
JB
45Summary: Support for different testing frameworks
46Summary(pl.UTF-8): Obsługa różnych szkieletów testowych
20ca8d44 47Group: Libraries/Python
94a9ebeb 48Requires: python3-modules >= 1:3.5
3693e166 49Requires: python3-zope-base
20ca8d44
JR
50
51%description -n python3-%{module}
3693e166
JB
52This package provides a number of testing frameworks. It supports both
53doctest and unittest.
20ca8d44
JR
54
55%description -n python3-%{module} -l pl.UTF-8
3693e166
JB
56Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
57doctest jak i unittest.
20ca8d44 58
6cceccf3 59%prep
5626eed1 60%setup -q -n %{module}-%{version}
6cceccf3 61
62%build
20ca8d44 63%if %{with python2}
3693e166 64%py_build %{?with_tests:test}
20ca8d44
JR
65%endif
66
67%if %{with python3}
3693e166 68%py3_build %{?with_tests:test}
20ca8d44
JR
69%endif
70
6cceccf3 71%install
72rm -rf $RPM_BUILD_ROOT
73
20ca8d44 74%if %{with python2}
a76cb8f3 75%py_install \
68c17400 76 --install-purelib=%{py_sitescriptdir}
6cceccf3 77
1b7c18e0 78%py_postclean
3693e166 79# tests
68c17400 80%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
20ca8d44
JR
81%endif
82
83%if %{with python3}
84%py3_install \
68c17400 85 --install-purelib=%{py3_sitescriptdir}
3693e166
JB
86
87# tests
68c17400 88%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
20ca8d44 89%endif
6cceccf3 90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
3693e166 94%if %{with python2}
6cceccf3 95%files
96%defattr(644,root,root,755)
3693e166 97%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
68c17400
JR
98%{py_sitescriptdir}/zope/testing
99%{py_sitescriptdir}/zope.testing-%{version}-py*.egg-info
100%{py_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth
3693e166 101%endif
20ca8d44
JR
102
103%if %{with python3}
104%files -n python3-%{module}
105%defattr(644,root,root,755)
3693e166 106%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
68c17400
JR
107%{py3_sitescriptdir}/zope/testing
108%{py3_sitescriptdir}/zope.testing-%{version}-py*.egg-info
109%{py3_sitescriptdir}/zope.testing-%{version}-py*-nspkg.pth
20ca8d44 110%endif
This page took 0.095837 seconds and 4 git commands to generate.