]> git.pld-linux.org Git - packages/python-parameterized.git/blob - python-parameterized.spec
dc8e5b4c62d9840e90c8a33608109ef6ba20ef84
[packages/python-parameterized.git] / python-parameterized.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Parameterized testing with any Python test framework
8 Summary(pl.UTF-8):      Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
9 Name:           python-parameterized
10 Version:        0.8.1
11 Release:        3
12 License:        BSD
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/parameterized/
15 Source0:        https://files.pythonhosted.org/packages/source/p/parameterized/parameterized-%{version}.tar.gz
16 # Source0-md5:  30e34da8db0b31bbc5c0ed86cfa9e7c1
17 Patch0:         %{name}-mock.patch
18 URL:            https://pypi.org/project/parameterized/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.5
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-mock
24 BuildRequires:  python-nose
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.2
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-nose
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.5
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Parameterized testing with any Python test framework (nose, py.test,
42 unittest).
43
44 %description -l pl.UTF-8
45 Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
46 (nose, py.test, unittest).
47
48 %package -n python3-parameterized
49 Summary:        Parameterized testing with any Python test framework
50 Summary(pl.UTF-8):      Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.2
53
54 %description -n python3-parameterized
55 Parameterized testing with any Python test framework (nose, py.test,
56 unittest).
57
58 %description -n python3-parameterized -l pl.UTF-8
59 Parametryzowane testowanie w dowolnym szkielecie testów pythonowych
60 (nose, py.test, unittest).
61
62 %prep
63 %setup -q -n parameterized-%{version}
64 %patch0 -p1
65
66 %build
67 %if %{with python2}
68 %py_build
69
70 %if %{with tests}
71 nosetests-%{py_ver} parameterized/test.py
72 %endif
73 %endif
74
75 %if %{with python3}
76 %py3_build
77
78 %if %{with tests}
79 nosetests-%{py3_ver} parameterized/test.py
80 %endif
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/parameterized/test.py*
91 %endif
92
93 %if %{with python3}
94 %py3_install
95
96 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/parameterized/test.py
97 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/parameterized/__pycache__/test.*.py*
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc CHANGELOG.txt LICENSE.txt README.rst
107 %{py_sitescriptdir}/parameterized
108 %{py_sitescriptdir}/parameterized-%{version}-py*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-parameterized
113 %defattr(644,root,root,755)
114 %doc CHANGELOG.txt LICENSE.txt README.rst
115 %{py3_sitescriptdir}/parameterized
116 %{py3_sitescriptdir}/parameterized-%{version}-py*.egg-info
117 %endif
This page took 0.069465 seconds and 2 git commands to generate.