]> git.pld-linux.org Git - packages/python-testtools.git/blob - python-testtools.spec
- release 4 (by relup.sh)
[packages/python-testtools.git] / python-testtools.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # HTML (sphinx-based) documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6 %bcond_without  tests   # do not perform tests
7
8 Summary:        Extensions to the Python unit testing framework
9 Summary(pl.UTF-8):      Rozszerzenie szkieletu testów jednostkowych Pythona
10 Name:           python-testtools
11 Version:        1.1.0
12 Release:        4
13 License:        MIT
14 Group:          Development/Tools
15 #Source0Download: https://pypi.python.org/pypi/testtools
16 Source0:        https://pypi.python.org/packages/source/t/testtools/testtools-%{version}.tar.gz
17 # Source0-md5:  47e330e90034919d51fae6dc66f2ab9b
18 URL:            https://github.com/testing-cabal/testtools
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-devel-tools
24 BuildRequires:  python-extras
25 BuildRequires:  python-mimeparse
26 BuildRequires:  python-testtools
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-devel >= 1:3.2
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-devel-tools
34 BuildRequires:  python3-extras
35 BuildRequires:  python3-mimeparse
36 BuildRequires:  python3-testtools
37 %endif
38 %endif
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %{?with_doc:BuildRequires:      sphinx-pdg}
41 Requires:       python-extras
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 testtools is a set of extensions to the Python standard library's unit
47 testing framework.
48
49 %description -l pl.UTF-8
50 testtools to zestaw rozszerzeń szkieletu testów jednostkowych z
51 biblioteki standardowej Pythona.
52
53 %package -n python3-testtools
54 Summary:        Extensions to the Python unit testing framework
55 Summary(pl.UTF-8):      Rozszerzenie szkieletu testów jednostkowych Pythona
56 Group:          Development/Tools
57 Requires:       python3-extras
58
59 %description -n python3-testtools
60 testtools is a set of extensions to the Python standard library's unit
61 testing framework.
62
63 %description -n python3-testtools -l pl.UTF-8
64 testtools to zestaw rozszerzeń szkieletu testów jednostkowych z
65 biblioteki standardowej Pythona.
66
67 %package doc
68 Summary:        Documentation for %{name}
69 Summary(pl.UTF-8):      Dokumentacja do pakietu %{name}
70 Group:          Documentation
71 Requires:       %{name} = %{version}-%{release}
72
73 %description doc
74 This package contains HTML documentation for %{name}.
75
76 %description doc -l pl.UTF-8
77 Dokumentacja HTML do pakietu %{name}.
78
79 %prep
80 %setup -q -n testtools-%{version}
81
82 %build
83 %if %{with python2}
84 %py_build %{?with_tests:test}
85 %endif
86
87 %if %{with python3}
88 %py3_build %{?with_tests:test}
89 %endif
90
91 %if %{with doc}
92 %{__make} -C doc html
93 %endif
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %py_install
100
101 %py_postclean
102 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testtools/tests/matchers
103 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/testtools/tests/{__init__,test_*}.py*
104 %endif
105
106 %if %{with python3}
107 %py3_install
108
109 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testtools/tests/matchers
110 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/testtools/tests/{__init__,test_*}.py* \
111         $RPM_BUILD_ROOT%{py3_sitescriptdir}/testtools/tests/__pycache__/{__init__,test_*}.*.py*
112 %endif
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %files
119 %defattr(644,root,root,755)
120 %doc LICENSE NEWS README.rst
121 %dir %{py_sitescriptdir}/testtools
122 %{py_sitescriptdir}/testtools/*.py[co]
123 %dir %{py_sitescriptdir}/testtools/matchers
124 %{py_sitescriptdir}/testtools/matchers/*.py[co]
125 %dir %{py_sitescriptdir}/testtools/testresult
126 %{py_sitescriptdir}/testtools/testresult/*.py[co]
127 %dir %{py_sitescriptdir}/testtools/tests
128 %{py_sitescriptdir}/testtools/tests/helpers.py[co]
129 %{py_sitescriptdir}/testtools-%{version}-py*.egg-info
130 %endif
131
132 %if %{with python3}
133 %files -n python3-testtools
134 %defattr(644,root,root,755)
135 %doc LICENSE NEWS README.rst
136 %dir %{py3_sitescriptdir}/testtools
137 %{py3_sitescriptdir}/testtools/*.py
138 %{py3_sitescriptdir}/testtools/__pycache__
139 %dir %{py3_sitescriptdir}/testtools/matchers
140 %{py3_sitescriptdir}/testtools/matchers/*.py
141 %{py3_sitescriptdir}/testtools/matchers/__pycache__
142 %dir %{py3_sitescriptdir}/testtools/testresult
143 %{py3_sitescriptdir}/testtools/testresult/*.py
144 %{py3_sitescriptdir}/testtools/testresult/__pycache__
145 %dir %{py3_sitescriptdir}/testtools/tests
146 %{py3_sitescriptdir}/testtools/tests/helpers.py
147 %{py3_sitescriptdir}/testtools/tests/__pycache__
148 %{py3_sitescriptdir}/testtools-%{version}-py*.egg-info
149 %endif
150
151 %if %{with doc}
152 %files doc
153 %defattr(644,root,root,755)
154 %doc doc/_build/html/*
155 %endif
This page took 0.120377 seconds and 3 git commands to generate.