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