]> git.pld-linux.org Git - packages/python-pyhamcrest.git/blob - python-pyhamcrest.spec
- release 2 (by relup.sh)
[packages/python-pyhamcrest.git] / python-pyhamcrest.spec
1 # NOTE: for versions >= 2.0 see python3-pyhamcrest.spec
2 #
3 # Conditional build:
4 %bcond_without  doc     # Sphinx documentation
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module (see python3-pyhamcrest.spec)
7
8 Summary:        Hamcrest framework for matcher objects
9 Summary(pl.UTF-8):      Szkielet Hamcrest do obiektów dopasowujących
10 Name:           python-pyhamcrest
11 # keep 1.x here (2.x drops python 2 support)
12 Version:        1.10.1
13 Release:        2
14 License:        BSD
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/pyhamcrest/
17 Source0:        https://files.pythonhosted.org/packages/source/p/pyhamcrest/PyHamcrest-%{version}.tar.gz
18 # Source0-md5:  6be265e4704aacd20cf8e4dd4eeb7dd3
19 URL:            https://pypi.org/project/PyHamcrest/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.6
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules >= 1:3.5
26 BuildRequires:  python3-setuptools
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 %if %{with doc}
31 BuildRequires:  python3-six
32 BuildRequires:  python3-sphinx_rtd_theme
33 BuildRequires:  sphinx-pdg-3
34 %endif
35 Requires:       python-modules >= 1:2.6
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 PyHamcrest is a framework for writing matcher objects, allowing you to
41 declaratively define "match" rules. There are a number of situations
42 where matchers are invaluable, such as UI validation, or data
43 filtering, but it is in the area of writing flexible tests that
44 matchers are most commonly used.
45
46 %description -l pl.UTF-8
47 PyHamcrest to szkielet do pisania obiektów dopasowujących,
48 pozwalających deklaratywnie definiować reguły dopasowań. Jest wiele
49 sytuacji, gdzie dopasowywanie jest bezcenne, np. sprawdzanie
50 poprawności w interfejsie użytkownika, filtrowanie danych, ale
51 najczęściej jest przydatne w obszarze pisania elastycznych testów.
52
53 %package -n python3-pyhamcrest
54 Summary:        Hamcrest framework for matcher objects
55 Summary(pl.UTF-8):      Szkielet Hamcrest do obiektów dopasowujących
56 Group:          Libraries/Python
57 Requires:       python3-modules >= 1:3.5
58
59 %description -n python3-pyhamcrest
60 PyHamcrest is a framework for writing matcher objects, allowing you to
61 declaratively define "match" rules. There are a number of situations
62 where matchers are invaluable, such as UI validation, or data
63 filtering, but it is in the area of writing flexible tests that
64 matchers are most commonly used.
65
66 %description -n python3-pyhamcrest -l pl.UTF-8
67 PyHamcrest to szkielet do pisania obiektów dopasowujących,
68 pozwalających deklaratywnie definiować reguły dopasowań. Jest wiele
69 sytuacji, gdzie dopasowywanie jest bezcenne, np. sprawdzanie
70 poprawności w interfejsie użytkownika, filtrowanie danych, ale
71 najczęściej jest przydatne w obszarze pisania elastycznych testów.
72
73 %package apidocs
74 Summary:        API documentation for Python pyhamcrest module
75 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pyhamcrest
76 Group:          Documentation
77
78 %description apidocs
79 API documentation for Python pyhamcrest module.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona pyhamcrest.
83
84 %prep
85 %setup -q -n PyHamcrest-%{version}
86
87 %build
88 %if %{with python2}
89 %py_build
90 %endif
91
92 %if %{with python3}
93 %py3_build
94 %endif
95
96 %if %{with doc}
97 PYTHONPATH=$(pwd)/src \
98 %{__make} -C doc html \
99         SPHINXBUILD=sphinx-build-3
100 %endif
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %py_install
107
108 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
109 cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
110
111 %py_postclean
112 %endif
113
114 %if %{with python3}
115 %py3_install
116
117 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
118 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
119 %endif
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %if %{with python2}
125 %files
126 %defattr(644,root,root,755)
127 %doc CHANGES.txt LICENSE.txt README.rst
128 %{py_sitescriptdir}/hamcrest
129 %{py_sitescriptdir}/PyHamcrest-%{version}-py*.egg-info
130 %{_examplesdir}/python-pyhamcrest-%{version}
131 %endif
132
133 %if %{with python3}
134 %files -n python3-pyhamcrest
135 %defattr(644,root,root,755)
136 %doc CHANGES.txt LICENSE.txt README.rst
137 %{py3_sitescriptdir}/hamcrest
138 %{py3_sitescriptdir}/PyHamcrest-%{version}-py*.egg-info
139 %{_examplesdir}/python3-pyhamcrest-%{version}
140 %endif
141
142 %if %{with doc}
143 %files apidocs
144 %defattr(644,root,root,755)
145 %doc doc/_build/html/{_static,*.html,*.js}
146 %endif
This page took 0.145576 seconds and 3 git commands to generate.