]> git.pld-linux.org Git - packages/python3-pyhamcrest.git/blob - python3-pyhamcrest.spec
- updated to 2.0.3
[packages/python3-pyhamcrest.git] / python3-pyhamcrest.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Hamcrest framework for matcher objects
7 Summary(pl.UTF-8):      Szkielet Hamcrest do obiektów dopasowujących
8 Name:           python3-pyhamcrest
9 Version:        2.0.3
10 Release:        1
11 License:        BSD
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
19 %if %{with tests}
20 BuildRequires:  python3-pytest >= 5.0
21 #BuildRequires: python3-pytest-sugar
22 %endif
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 %if %{with doc}
26 BuildRequires:  python3-alabaster >= 0.7
27 BuildRequires:  sphinx-pdg-3 >= 3.0
28 %endif
29 Requires:       python3-modules >= 1:3.5
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
39
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.
46
47 %package apidocs
48 Summary:        API documentation for Python pyhamcrest module
49 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pyhamcrest
50 Group:          Documentation
51
52 %description apidocs
53 API documentation for Python pyhamcrest module.
54
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API modułu Pythona pyhamcrest.
57
58 %prep
59 %setup -q -n PyHamcrest-%{version}
60
61 %build
62 %py3_build
63
64 %if %{with tests}
65 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
66 PYTHONPATH=$(pwd)/src \
67 %{__python3} -m pytest tests
68 %endif
69
70 %if %{with doc}
71 PYTHONPATH=$(pwd)/src \
72 %{__make} -C doc html \
73         SPHINXBUILD=sphinx-build-3
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %py3_install
80
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
82 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
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}
93
94 %if %{with doc}
95 %files apidocs
96 %defattr(644,root,root,755)
97 %doc doc/_build/html/{_static,*.html,*.js}
98 %endif
This page took 0.123633 seconds and 3 git commands to generate.