]> git.pld-linux.org Git - packages/python-pyhamcrest.git/blob - python-pyhamcrest.spec
- new
[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_without  python3 # CPython 3.x module
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:        1
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 # replace with other requires if defined in setup.py
36 Requires:       python-modules >= 1:2.6
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
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.
46
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.
53
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
59
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.
66
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.
73
74 %package apidocs
75 Summary:        API documentation for Python pyhamcrest module
76 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pyhamcrest
77 Group:          Documentation
78
79 %description apidocs
80 API documentation for Python pyhamcrest module.
81
82 %description apidocs -l pl.UTF-8
83 Dokumentacja API modułu Pythona pyhamcrest.
84
85 %prep
86 %setup -q -n PyHamcrest-%{version}
87
88 %build
89 %if %{with python2}
90 %py_build
91 %endif
92
93 %if %{with python3}
94 %py3_build
95 %endif
96
97 %if %{with doc}
98 PYTHONPATH=$(pwd)/src \
99 %{__make} -C doc html \
100         SPHINXBUILD=sphinx-build-3
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %py_install
108
109 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
110 cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-pyhamcrest-%{version}
111
112 %py_postclean
113 %endif
114
115 %if %{with python3}
116 %py3_install
117
118 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
119 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-pyhamcrest-%{version}
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %files
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}
132 %endif
133
134 %if %{with python3}
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}
141 %endif
142
143 %if %{with doc}
144 %files apidocs
145 %defattr(644,root,root,755)
146 %doc doc/_build/html/{_static,*.html,*.js}
147 %endif
This page took 0.090551 seconds and 3 git commands to generate.