3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
6 Summary: Hamcrest framework for matcher objects
7 Summary(pl.UTF-8): Szkielet Hamcrest do obiektów dopasowujących
8 Name: python3-pyhamcrest
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/pyhamcrest/
14 Source0: https://files.pythonhosted.org/packages/source/p/pyhamcrest/PyHamcrest-%{version}.tar.gz
15 # Source0-md5: f628e2ff2b6a2518f54b15d70ac34c9d
16 URL: https://pypi.org/project/PyHamcrest/
17 BuildRequires: python3-modules >= 1:3.5
18 BuildRequires: python3-setuptools
20 BuildRequires: python3-pytest >= 5.0
21 #BuildRequires: python3-pytest-sugar
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRequires: python3-alabaster >= 0.7
27 BuildRequires: sphinx-pdg-3 >= 3.0
29 Requires: python3-modules >= 1:3.5
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 PyHamcrest is a framework for writing matcher objects, allowing you to
35 declaratively define "match" rules. There are a number of situations
36 where matchers are invaluable, such as UI validation, or data
37 filtering, but it is in the area of writing flexible tests that
38 matchers are most commonly used.
40 %description -l pl.UTF-8
41 PyHamcrest to szkielet do pisania obiektów dopasowujących,
42 pozwalających deklaratywnie definiować reguły dopasowań. Jest wiele
43 sytuacji, gdzie dopasowywanie jest bezcenne, np. sprawdzanie
44 poprawności w interfejsie użytkownika, filtrowanie danych, ale
45 najczęściej jest przydatne w obszarze pisania elastycznych testów.
48 Summary: API documentation for Python pyhamcrest module
49 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyhamcrest
53 API documentation for Python pyhamcrest module.
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API modułu Pythona pyhamcrest.
59 %setup -q -n PyHamcrest-%{version}
65 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
66 PYTHONPATH=$(pwd)/src \
67 %{__python3} -m pytest tests
71 PYTHONPATH=$(pwd)/src \
72 %{__make} -C doc html \
73 SPHINXBUILD=sphinx-build-3
77 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
82 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
85 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc CHANGELOG.rst LICENSE.txt README.rst
90 %{py3_sitescriptdir}/hamcrest
91 %{py3_sitescriptdir}/PyHamcrest-%{version}-py*.egg-info
92 %{_examplesdir}/python3-pyhamcrest-%{version}
96 %defattr(644,root,root,755)
97 %doc doc/_build/html/{_static,*.html,*.js}