1 # NOTE: for python-elementpath >= 1.4 (for python 3.5+) see python3-elementpath.spec
4 %bcond_without doc # Sphinx documentation
5 %bcond_without tests # unit tests
6 %bcond_without python2 # CPython 2.x module
7 %bcond_with python3 # CPython 3.x module (built from python3-elementpath.spec)
9 Summary: XPath 1.0/2.0 parsers and selectors for ElementTree and lxml
10 Summary(pl.UTF-8): Parsery i selektory XPath 1.0/2.0 dla ElementTree oraz lxml
11 Name: python-elementpath
12 # keep 1.3.x here for python2 support
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/elementpath/
18 Source0: https://files.pythonhosted.org/packages/source/e/elementpath/elementpath-%{version}.tar.gz
19 # Source0-md5: 3712104ae5970878a112c31aea71a503
20 Patch0: %{name}-hash.patch
21 URL: https://pypi.org/project/elementpath/
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools
26 BuildRequires: python-lxml
30 BuildRequires: python3-modules >= 1:3.5
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-lxml
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
39 BuildRequires: sphinx-pdg
41 Requires: python-modules >= 1:2.7
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 The proposal of this package is to provide XPath 1.0 and 2.0 selectors
47 for Python's ElementTree XML data structures, both for the standard
48 ElementTree library and for the lxml.etree library.
50 %description -l pl.UTF-8
51 Celem tego pakietu jest udostępnienie selektorów XPath 1.0 i 2.0 do
52 pythonowych struktur danych XML ElementTree, zarówno dla ElementTree z
53 biblioteki strandardowej, jak i lxml.etree.
55 %package -n python3-elementpath
56 Summary: XPath 1.0/2.0 parsers and selectors for ElementTree and lxml
57 Summary(pl.UTF-8): Parsery i selektory XPath 1.0/2.0 dla ElementTree oraz lxml
58 Group: Libraries/Python
59 Requires: python3-modules >= 1:3.5
61 %description -n python3-elementpath
62 The proposal of this package is to provide XPath 1.0 and 2.0 selectors
63 for Python's ElementTree XML data structures, both for the standard
64 ElementTree library and for the lxml.etree library.
66 %description -n python3-elementpath -l pl.UTF-8
67 Celem tego pakietu jest udostępnienie selektorów XPath 1.0 i 2.0 do
68 pythonowych struktur danych XML ElementTree, zarówno dla ElementTree z
69 biblioteki strandardowej, jak i lxml.etree.
72 Summary: API documentation for Python elementpath module
73 Summary(pl.UTF-8): Dokumentacja API modułu Pythona elementpath
77 API documentation for Python elementpath module.
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona elementpath.
83 %setup -q -n elementpath-%{version}
92 %{__python} tests/test_elementpath.py
100 %{__python3} -m unittest
105 %{__make} -C doc html
109 rm -rf $RPM_BUILD_ROOT
122 rm -rf $RPM_BUILD_ROOT
126 %defattr(644,root,root,755)
127 %doc CHANGELOG.rst LICENSE README.rst
128 %{py_sitescriptdir}/elementpath
129 %{py_sitescriptdir}/elementpath-%{version}-py*.egg-info
133 %files -n python3-elementpath
134 %defattr(644,root,root,755)
135 %doc CHANGELOG.rst LICENSE README.rst
136 %{py3_sitescriptdir}/elementpath
137 %{py3_sitescriptdir}/elementpath-%{version}-py*.egg-info
142 %defattr(644,root,root,755)
143 %doc doc/_build/html/{_static,*.html,*.js}