1 # NOTE: for versions >= 2.0 see python3-pyhamcrest.spec
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)
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)
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/
21 BuildRequires: python-modules >= 1:2.6
22 BuildRequires: python-setuptools
25 BuildRequires: python3-modules >= 1:3.5
26 BuildRequires: python3-setuptools
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.714
31 BuildRequires: python3-six
32 BuildRequires: python3-sphinx_rtd_theme
33 BuildRequires: sphinx-pdg-3
35 Requires: python-modules >= 1:2.6
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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.
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
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.
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.
74 Summary: API documentation for Python pyhamcrest module
75 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyhamcrest
79 API documentation for Python pyhamcrest module.
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona pyhamcrest.
85 %setup -q -n PyHamcrest-%{version}
97 PYTHONPATH=$(pwd)/src \
98 %{__make} -C doc html \
99 SPHINXBUILD=sphinx-build-3
103 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
109 cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
117 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
118 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
122 rm -rf $RPM_BUILD_ROOT
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}
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}
144 %defattr(644,root,root,755)
145 %doc doc/_build/html/{_static,*.html,*.js}