]> git.pld-linux.org Git - packages/python-genty.git/blob - python-genty.spec
rebuild with tests and docs
[packages/python-genty.git] / python-genty.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:        Running a test with multiple data sets
8 Summary(pl.UTF-8):      Uruchamianie testu z wieloma zbiorami danych
9 Name:           python-genty
10 Version:        1.3.2
11 Release:        5
12 License:        Apache v2.0
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/genty/
15 Source0:        https://files.pythonhosted.org/packages/source/g/genty/genty-%{version}.tar.gz
16 # Source0-md5:  45141bfcd0b77ff8e52e5de2944ff157
17 Patch0:         %{name}-mock.patch
18 URL:            https://pypi.org/project/genty/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-mock
24 BuildRequires:  python-six
25 %if "%{py_ver}" < "2.7"
26 BuildRequires:  python-ordereddict
27 BuildRequires:  python-unittest2
28 %endif
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.3
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-six
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 Requires:       python-modules >= 1:2.6
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Genty, pronounced "gen-tee", stands for "generate tests". It promotes
46 generative testing, where a single test can execute over a variety of
47 input.
48
49 %description -l pl.UTF-8
50 Genty, wymawiane jak "gen-tee", oznacza generowanie testów. Wspiera
51 testowanie generyczne, w którym pojedynczy test może być wykonywany na
52 wielu różnych wejściach.
53
54 %package -n python3-genty
55 Summary:        Running a test with multiple data sets
56 Summary(pl.UTF-8):      Uruchamianie testu z wieloma zbiorami danych
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.3
59
60 %description -n python3-genty
61 Genty, pronounced "gen-tee", stands for "generate tests". It promotes
62 generative testing, where a single test can execute over a variety of
63 input.
64
65 %description -n python3-genty -l pl.UTF-8
66 Genty, wymawiane jak "gen-tee", oznacza generowanie testów. Wspiera
67 testowanie generyczne, w którym pojedynczy test może być wykonywany na
68 wielu różnych wejściach.
69
70 %prep
71 %setup -q -n genty-%{version}
72 %patch0 -p1
73
74 %build
75 %if %{with python2}
76 %py_build
77
78 %if %{with tests}
79 %{__python} -m unittest discover -s test
80 %endif
81 %endif
82
83 %if %{with python3}
84 %py3_build
85
86 %if %{with tests}
87 %{__python3} -m unittest discover -s test
88 %endif
89 %endif
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %py_install
96
97 %py_postclean
98 %endif
99
100 %if %{with python3}
101 %py3_install
102 %endif
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %if %{with python2}
108 %files
109 %defattr(644,root,root,755)
110 %doc LICENSE README.rst
111 %{py_sitescriptdir}/genty
112 %{py_sitescriptdir}/genty-%{version}-py*.egg-info
113 %endif
114
115 %if %{with python3}
116 %files -n python3-genty
117 %defattr(644,root,root,755)
118 %doc LICENSE README.rst
119 %{py3_sitescriptdir}/genty
120 %{py3_sitescriptdir}/genty-%{version}-py*.egg-info
121 %endif
This page took 0.110324 seconds and 4 git commands to generate.