]> git.pld-linux.org Git - packages/python-zope.testing.git/blob - python-zope.testing.spec
rebuild with python 3.10
[packages/python-zope.testing.git] / python-zope.testing.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
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}
11 Version:        4.9
12 Release:        2
13 License:        ZPL v2.1
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/
19 %if %{with python2}
20 BuildRequires:  python >= 1:2.7
21 BuildRequires:  python-devel >= 1:2.7
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel >= 1:3.5
25 BuildRequires:  python3-modules >= 1:3.5
26 BuildRequires:  python3-setuptools
27 %endif
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
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 This package provides a number of testing frameworks. It supports both
38 doctest and unittest.
39
40 %description -l pl.UTF-8
41 Ten pakiet udostępnia wiele szkieletów testowych. Obsługuje zarówno
42 doctest jak i unittest.
43
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
50
51 %description -n python3-%{module}
52 This package provides a number of testing frameworks. It supports both
53 doctest and unittest.
54
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.
58
59 %prep
60 %setup -q -n %{module}-%{version}
61
62 %build
63 %if %{with python2}
64 %py_build %{?with_tests:test}
65 %endif
66
67 %if %{with python3}
68 %py3_build %{?with_tests:test}
69 %endif
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %if %{with python2}
75 %py_install \
76         --install-purelib=%{py_sitescriptdir}
77
78 %py_postclean
79 # tests
80 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
81 %endif
82
83 %if %{with python3}
84 %py3_install \
85         --install-purelib=%{py3_sitescriptdir}
86
87 # tests
88 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testing/{test_renormalizing,tests}.py*
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
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
101 %endif
102
103 %if %{with python3}
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
110 %endif
This page took 0.087716 seconds and 3 git commands to generate.