]> git.pld-linux.org Git - packages/python-testscenarios.git/blame - python-testscenarios.spec
- tests are passing with fixed testtools packaging (when testtools.tests.helpers...
[packages/python-testscenarios.git] / python-testscenarios.spec
CommitLineData
aa2fd2ec
JB
1#
2# Conditional build:
3%bcond_without tests # make check
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Testscenarios - pyunit extension for dependency injection
8Summary(pl.UTF-8): Testscenarios - rozszerzenie pyunit do wstrzykiwania zależności
9Name: python-testscenarios
10Version: 0.5.0
270fe9a0 11Release: 3
aa2fd2ec
JB
12License: Apache v2.0 or BSD
13Group: Libraries/Python
5eafe535
JB
14#Source0Download: https://pypi.org/simple/testscenarios/
15Source0: https://files.pythonhosted.org/packages/source/t/testscenarios/testscenarios-%{version}.tar.gz
aa2fd2ec
JB
16# Source0-md5: 859073d9e7b049aee2e6704c51f6001a
17URL: https://launchpad.net/testscenarios
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.6
22BuildRequires: python-pbr >= 0.11
23BuildRequires: python-setuptools
24BuildRequires: python-testtools
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.2
28BuildRequires: python3-pbr >= 0.11
29BuildRequires: python3-setuptools
30BuildRequires: python3-testtools
31%endif
32Requires: python-modules >= 1:2.6
33Requires: python-pbr >= 0.11
34Requires: python-testtools
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39testscenarios provides clean dependency injection for python unittest
40style tests. This can be used for interface testing (testing many
41implementations via a single test suite) or for classic dependency
42injection (provide tests with dependencies externally to the test code
43itself, allowing easy testing in different situations).
44
45%description -l pl.UTF-8
46Moduł testscenarios zapewnia czyste wstrzykiwanie zależności dla
47testów pythonowych w stylu unittest. Może to być używane do testowania
48interfejsów (testowania wielu implementacji poprzez prosty zestaw
49testów) albo klasycznego wstrzykiwania zależności (dostarczania testów
50z zależnościami zewnętrznymi w stosunku do kodu testującego, co
51pozwala na łatwiejsze testowanie w różnych sytuacjach).
52
53%package -n python3-testscenarios
54Summary: Testscenarios - pyunit extension for dependency injection
55Summary(pl.UTF-8): Testscenarios - rozszerzenie pyunit do wstrzykiwania zależności
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.2
58Requires: python3-pbr >= 0.11
59Requires: python3-testtools
60
61%description -n python3-testscenarios
62testscenarios provides clean dependency injection for python unittest
63style tests. This can be used for interface testing (testing many
64implementations via a single test suite) or for classic dependency
65injection (provide tests with dependencies externally to the test code
66itself, allowing easy testing in different situations).
67
68%description -n python3-testscenarios -l pl.UTF-8
69Moduł testscenarios zapewnia czyste wstrzykiwanie zależności dla
70testów pythonowych w stylu unittest. Może to być używane do testowania
71interfejsów (testowania wielu implementacji poprzez prosty zestaw
72testów) albo klasycznego wstrzykiwania zależności (dostarczania testów
73z zależnościami zewnętrznymi w stosunku do kodu testującego, co
74pozwala na łatwiejsze testowanie w różnych sytuacjach).
75
76%prep
77%setup -q -n testscenarios-%{version}
78
79%build
80%if %{with python2}
81%py_build
82
5eafe535
JB
83%if %{with tests}
84%{__make} check \
85 PYTHON=%{__python}
86%endif
aa2fd2ec
JB
87%endif
88
89%if %{with python3}
90%py3_build
91
5eafe535
JB
92%if %{with tests}
93%{__make} check \
94 PYTHON=%{__python3}
95%endif
aa2fd2ec
JB
96%endif
97
98%install
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%py_install
103
104%py_postclean
105%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testscenarios/tests
106%endif
107
108%if %{with python3}
109%py3_install
110%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testscenarios/tests
111%endif
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
116%if %{with python2}
117%files
118%defattr(644,root,root,755)
119%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
120%{py_sitescriptdir}/testscenarios
121%{py_sitescriptdir}/testscenarios-%{version}-py*.egg-info
122%endif
123
124%if %{with python3}
125%files -n python3-testscenarios
126%defattr(644,root,root,755)
127%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
128%{py3_sitescriptdir}/testscenarios
129%{py3_sitescriptdir}/testscenarios-%{version}-py*.egg-info
130%endif
This page took 0.058566 seconds and 4 git commands to generate.