]> git.pld-linux.org Git - packages/python-testrepository.git/blame - python-testrepository.spec
rebuild with tests and docs
[packages/python-testrepository.git] / python-testrepository.spec
CommitLineData
77692d24
JB
1#
2# Conditional build:
3%bcond_with tests # testr (python 2 only because of bzr dependency, broken as of 0.0.20)
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: A repository of test results
8Summary(pl.UTF-8): Repozytorium wyników testów
9Name: python-testrepository
10Version: 0.0.20
e7bf2485 11Release: 9
77692d24
JB
12License: Apache v2.0 or BSD
13Group: Libraries/Python
f1a357e4 14#Source0Download: https://pypi.org/simple/testrepository/
77692d24
JB
15Source0: https://pypi.python.org/packages/source/t/testrepository/testrepository-%{version}.tar.gz
16# Source0-md5: f648b0aceeca4fcd5f8a62eeedea289b
17URL: https://launchpad.net/testrepository
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.6
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-bzr
f1a357e4 25BuildRequires: python-fixtures
77692d24 26BuildRequires: python-pytz
f1a357e4 27BuildRequires: python-subunit >= 0.0.18
77692d24
JB
28BuildRequires: python-testresources
29BuildRequires: python-testscenarios
f1a357e4 30BuildRequires: python-testtools >= 0.9.30
77692d24
JB
31%endif
32%endif
33%if %{with python3}
34BuildRequires: python3-modules >= 1:3.2
35BuildRequires: python3-setuptools
36# no bzr for python3, so no tests
37%if %{with python3_tests}
38BuildRequires: python3-bzr
f1a357e4 39BuildRequires: python3-fixtures
77692d24 40BuildRequires: python3-pytz
f1a357e4 41BuildRequires: python3-subunit >= 0.0.18
77692d24
JB
42BuildRequires: python3-testresources
43BuildRequires: python3-testscenarios
f1a357e4 44BuildRequires: python3-testtools >= 0.9.30
77692d24
JB
45%endif
46%endif
77692d24 47Requires: python-modules >= 1:2.6
77692d24
JB
48BuildArch: noarch
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
52This project provides a database of test results which can be used as
53part of developer workflow to ensure/check things like:
54- No commits without having had a test failure, test fixed cycle.
55- No commits without new tests being added.
56- What tests have failed since the last commit (to run just a subset).
57- What tests are currently failing and need work.
58
59Test results are inserted using subunit (and thus anything that can
60output subunit or be converted into a subunit stream can be accepted).
61
62%description -l pl.UTF-8
63Ten projekt zapewnia bazę danych wyników testów, które można używać
64jako część ciągu pracy programistów, mającą na celu
65zapewnienie/sprawdzenie, że:
66- nie wejdą zmiany bez naprawienia nieprzechodzących testów
67- nie wejdą zmiany bez dodania nowych testów
68- które testy nie powiodły się od ostatnich zmian (aby uruchomić
69 podzbiór)
70- które testy obecnie nie przechodzą i wymagają pracy
71
72Wyniki testów są wprowadzane przy użyciu modułu subunit (więc może być
73przyjęte wszystko, co na wyjściu ma format subunit albo może być
74przekonwertowane do takiego strumienia).
75
76%package -n python3-testrepository
77Summary: A repository of test results
78Summary(pl.UTF-8): Repozytorium wyników testów
79Group: Libraries/Python
77692d24 80Requires: python3-modules >= 1:3.2
77692d24
JB
81
82%description -n python3-testrepository
83This project provides a database of test results which can be used as
84part of developer workflow to ensure/check things like:
85- No commits without having had a test failure, test fixed cycle.
86- No commits without new tests being added.
87- What tests have failed since the last commit (to run just a subset).
88- What tests are currently failing and need work.
89
90Test results are inserted using subunit (and thus anything that can
91output subunit or be converted into a subunit stream can be accepted).
92
93%description -n python3-testrepository -l pl.UTF-8
94Ten projekt zapewnia bazę danych wyników testów, które można używać
95jako część ciągu pracy programistów, mającą na celu
96zapewnienie/sprawdzenie, że:
97- nie wejdą zmiany bez naprawienia nieprzechodzących testów
98- nie wejdą zmiany bez dodania nowych testów
99- które testy nie powiodły się od ostatnich zmian (aby uruchomić
100 podzbiór)
101- które testy obecnie nie przechodzą i wymagają pracy
102
103Wyniki testów są wprowadzane przy użyciu modułu subunit (więc może być
104przyjęte wszystko, co na wyjściu ma format subunit albo może być
105przekonwertowane do takiego strumienia).
106
107%prep
108%setup -q -n testrepository-%{version}
109
110%build
111%if %{with python2}
112%py_build
f1a357e4 113%{?with_tests:%{__python} testr init && %{__python} testr run}
77692d24
JB
114%endif
115
116%if %{with python3}
117%py3_build %{?with_tests:test}
f1a357e4 118%{?with_python3_tests:%{__python3} testr init && %{__python3} testr run}
77692d24
JB
119%endif
120
121%install
122rm -rf $RPM_BUILD_ROOT
123
124%if %{with python2}
125%py_install
126%{__mv} $RPM_BUILD_ROOT%{_bindir}/testr{,-2}
127
128%py_postclean
129%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testrepository/tests
130%endif
131
132%if %{with python3}
133%py3_install
134%{__mv} $RPM_BUILD_ROOT%{_bindir}/testr{,-3}
135
136%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testrepository/tests
137%endif
138
139%if %{with python2}
140ln -sf testr-2 $RPM_BUILD_ROOT%{_bindir}/testr
141%endif
142
143%clean
144rm -rf $RPM_BUILD_ROOT
145
146%if %{with python2}
147%files
148%defattr(644,root,root,755)
149%doc BSD COPYING NEWS README.txt doc
150%attr(755,root,root) %{_bindir}/testr
151%attr(755,root,root) %{_bindir}/testr-2
152%{py_sitescriptdir}/testrepository
153%{py_sitescriptdir}/testrepository-%{version}-py*.egg-info
154%endif
155
156%if %{with python3}
157%files -n python3-testrepository
158%defattr(644,root,root,755)
159%doc BSD COPYING NEWS README.txt doc
160%attr(755,root,root) %{_bindir}/testr-3
161%{py3_sitescriptdir}/testrepository
162%{py3_sitescriptdir}/testrepository-%{version}-py*.egg-info
163%endif
This page took 0.176031 seconds and 4 git commands to generate.