]> git.pld-linux.org Git - packages/python-testscenarios.git/blame - python-testscenarios.spec
rebuild with python 3.10
[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
53611cf5 11Release: 6
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
aa2fd2ec
JB
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37testscenarios provides clean dependency injection for python unittest
38style tests. This can be used for interface testing (testing many
39implementations via a single test suite) or for classic dependency
40injection (provide tests with dependencies externally to the test code
41itself, allowing easy testing in different situations).
42
43%description -l pl.UTF-8
44Moduł testscenarios zapewnia czyste wstrzykiwanie zależności dla
45testów pythonowych w stylu unittest. Może to być używane do testowania
46interfejsów (testowania wielu implementacji poprzez prosty zestaw
47testów) albo klasycznego wstrzykiwania zależności (dostarczania testów
48z zależnościami zewnętrznymi w stosunku do kodu testującego, co
49pozwala na łatwiejsze testowanie w różnych sytuacjach).
50
51%package -n python3-testscenarios
52Summary: Testscenarios - pyunit extension for dependency injection
53Summary(pl.UTF-8): Testscenarios - rozszerzenie pyunit do wstrzykiwania zależności
54Group: Libraries/Python
55Requires: python3-modules >= 1:3.2
aa2fd2ec
JB
56
57%description -n python3-testscenarios
58testscenarios provides clean dependency injection for python unittest
59style tests. This can be used for interface testing (testing many
60implementations via a single test suite) or for classic dependency
61injection (provide tests with dependencies externally to the test code
62itself, allowing easy testing in different situations).
63
64%description -n python3-testscenarios -l pl.UTF-8
65Moduł testscenarios zapewnia czyste wstrzykiwanie zależności dla
66testów pythonowych w stylu unittest. Może to być używane do testowania
67interfejsów (testowania wielu implementacji poprzez prosty zestaw
68testów) albo klasycznego wstrzykiwania zależności (dostarczania testów
69z zależnościami zewnętrznymi w stosunku do kodu testującego, co
70pozwala na łatwiejsze testowanie w różnych sytuacjach).
71
72%prep
73%setup -q -n testscenarios-%{version}
74
75%build
76%if %{with python2}
77%py_build
78
5eafe535
JB
79%if %{with tests}
80%{__make} check \
81 PYTHON=%{__python}
82%endif
aa2fd2ec
JB
83%endif
84
85%if %{with python3}
86%py3_build
87
5eafe535
JB
88%if %{with tests}
89%{__make} check \
90 PYTHON=%{__python3}
91%endif
aa2fd2ec
JB
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.090156 seconds and 4 git commands to generate.