]>
Commit | Line | Data |
---|---|---|
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 | 8 | Summary: Support for different testing frameworks |
1b7c18e0 | 9 | Summary(pl.UTF-8): Obsługa różnych szkieletów testowych |
5626eed1 | 10 | Name: python-%{module} |
6a6742d2 | 11 | Version: 4.9 |
786ba62a | 12 | Release: 2 |
3693e166 | 13 | License: ZPL v2.1 |
010232c6 | 14 | Group: Libraries/Python |
3693e166 JB |
15 | #Source0Download: https://pypi.org/simple/zope-testing/ |
16 | Source0: https://files.pythonhosted.org/packages/source/z/zope.testing/zope.testing-%{version}.tar.gz | |
6a6742d2 | 17 | # Source0-md5: 35d3b8a163874bfc18a084534b52e186 |
3693e166 | 18 | URL: https://www.zope.org/ |
20ca8d44 | 19 | %if %{with python2} |
3693e166 JB |
20 | BuildRequires: python >= 1:2.7 |
21 | BuildRequires: python-devel >= 1:2.7 | |
20ca8d44 JR |
22 | %endif |
23 | %if %{with python3} | |
94a9ebeb JB |
24 | BuildRequires: python3-devel >= 1:3.5 |
25 | BuildRequires: python3-modules >= 1:3.5 | |
20ca8d44 JR |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
1b7c18e0 | 28 | BuildRequires: rpm-pythonprov |
3693e166 JB |
29 | BuildRequires: rpmbuild(macros) >= 1.714 |
30 | Requires: python-modules >= 1:2.7 | |
31 | Requires: python-zope-base | |
6fc855a8 | 32 | Obsoletes: Zope-Testing < 4 |
68c17400 | 33 | BuildArch: noarch |
6cceccf3 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
3693e166 JB |
37 | This package provides a number of testing frameworks. It supports both |
38 | doctest and unittest. | |
1b7c18e0 JB |
39 | |
40 | %description -l pl.UTF-8 | |
3693e166 JB |
41 | Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno |
42 | doctest jak i unittest. | |
6cceccf3 | 43 | |
20ca8d44 | 44 | %package -n python3-%{module} |
3693e166 JB |
45 | Summary: Support for different testing frameworks |
46 | Summary(pl.UTF-8): Obsługa różnych szkieletów testowych | |
20ca8d44 | 47 | Group: Libraries/Python |
94a9ebeb | 48 | Requires: python3-modules >= 1:3.5 |
3693e166 | 49 | Requires: python3-zope-base |
20ca8d44 JR |
50 | |
51 | %description -n python3-%{module} | |
3693e166 JB |
52 | This package provides a number of testing frameworks. It supports both |
53 | doctest and unittest. | |
20ca8d44 JR |
54 | |
55 | %description -n python3-%{module} -l pl.UTF-8 | |
3693e166 JB |
56 | Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno |
57 | doctest 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 |
72 | rm -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 | |
92 | rm -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 |