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