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_without python3 # CPython 3.x module
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 # replace with other requires if defined in setup.py
36 Requires: python-modules >= 1:2.6
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 PyHamcrest is a framework for writing matcher objects, allowing you to
42 declaratively define "match" rules. There are a number of situations
43 where matchers are invaluable, such as UI validation, or data
44 filtering, but it is in the area of writing flexible tests that
45 matchers are most commonly used.
47 %description -l pl.UTF-8
48 PyHamcrest to szkielet do pisania obiektów dopasowujących,
49 pozwalających deklaratywnie definiować reguły dopasowań. Jest wiele
50 sytuacji, gdzie dopasowywanie jest bezcenne, np. sprawdzanie
51 poprawności w interfejsie użytkownika, filtrowanie danych, ale
52 najczęściej jest przydatne w obszarze pisania elastycznych testów.
54 %package -n python3-pyhamcrest
55 Summary: Hamcrest framework for matcher objects
56 Summary(pl.UTF-8): Szkielet Hamcrest do obiektów dopasowujących
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.5
60 %description -n python3-pyhamcrest
61 PyHamcrest is a framework for writing matcher objects, allowing you to
62 declaratively define "match" rules. There are a number of situations
63 where matchers are invaluable, such as UI validation, or data
64 filtering, but it is in the area of writing flexible tests that
65 matchers are most commonly used.
67 %description -n python3-pyhamcrest -l pl.UTF-8
68 PyHamcrest to szkielet do pisania obiektów dopasowujących,
69 pozwalających deklaratywnie definiować reguły dopasowań. Jest wiele
70 sytuacji, gdzie dopasowywanie jest bezcenne, np. sprawdzanie
71 poprawności w interfejsie użytkownika, filtrowanie danych, ale
72 najczęściej jest przydatne w obszarze pisania elastycznych testów.
75 Summary: API documentation for Python pyhamcrest module
76 Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyhamcrest
80 API documentation for Python pyhamcrest module.
82 %description apidocs -l pl.UTF-8
83 Dokumentacja API modułu Pythona pyhamcrest.
86 %setup -q -n PyHamcrest-%{version}
98 PYTHONPATH=$(pwd)/src \
99 %{__make} -C doc html \
100 SPHINXBUILD=sphinx-build-3
104 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
110 cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
118 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
119 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
123 rm -rf $RPM_BUILD_ROOT
127 %defattr(644,root,root,755)
128 %doc CHANGES.txt LICENSE.txt README.rst
129 %{py_sitescriptdir}/hamcrest
130 %{py_sitescriptdir}/PyHamcrest-%{version}-py*.egg-info
131 %{_examplesdir}/python-pyhamcrest-%{version}
135 %files -n python3-pyhamcrest
136 %defattr(644,root,root,755)
137 %doc CHANGES.txt LICENSE.txt README.rst
138 %{py3_sitescriptdir}/hamcrest
139 %{py3_sitescriptdir}/PyHamcrest-%{version}-py*.egg-info
140 %{_examplesdir}/python3-pyhamcrest-%{version}
145 %defattr(644,root,root,755)
146 %doc doc/_build/html/{_static,*.html,*.js}