]>
Commit | Line | Data |
---|---|---|
3cadde8c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
3cadde8c JB |
5 | |
6 | Summary: XPath 1.0/2.0 parsers and selectors for ElementTree and lxml | |
7 | Summary(pl.UTF-8): Parsery i selektory XPath 1.0/2.0 dla ElementTree oraz lxml | |
814fb685 | 8 | Name: python3-elementpath |
901e77af JB |
9 | Version: 2.5.0 |
10 | Release: 1 | |
3cadde8c JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/elementpath/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/e/elementpath/elementpath-%{version}.tar.gz | |
901e77af | 15 | # Source0-md5: 352e7980c3be9716a355f7588bd151c2 |
3cadde8c | 16 | URL: https://pypi.org/project/elementpath/ |
901e77af | 17 | BuildRequires: python3-modules >= 1:3.7 |
3cadde8c JB |
18 | BuildRequires: python3-setuptools |
19 | %if %{with tests} | |
20 | BuildRequires: python3-lxml | |
21 | %endif | |
3cadde8c JB |
22 | BuildRequires: rpm-pythonprov |
23 | BuildRequires: rpmbuild(macros) >= 1.714 | |
24 | %if %{with doc} | |
25 | BuildRequires: sphinx-pdg | |
26 | %endif | |
901e77af | 27 | Requires: python3-modules >= 1:3.7 |
3cadde8c JB |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | The proposal of this package is to provide XPath 1.0 and 2.0 selectors | |
33 | for Python's ElementTree XML data structures, both for the standard | |
34 | ElementTree library and for the lxml.etree library. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Celem tego pakietu jest udostępnienie selektorów XPath 1.0 i 2.0 do | |
38 | pythonowych struktur danych XML ElementTree, zarówno dla ElementTree z | |
39 | biblioteki strandardowej, jak i lxml.etree. | |
40 | ||
3cadde8c JB |
41 | %package apidocs |
42 | Summary: API documentation for Python elementpath module | |
43 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona elementpath | |
44 | Group: Documentation | |
45 | ||
46 | %description apidocs | |
47 | API documentation for Python elementpath module. | |
48 | ||
49 | %description apidocs -l pl.UTF-8 | |
50 | Dokumentacja API modułu Pythona elementpath. | |
51 | ||
52 | %prep | |
53 | %setup -q -n elementpath-%{version} | |
3cadde8c JB |
54 | |
55 | %build | |
3cadde8c JB |
56 | %py3_build |
57 | ||
58 | %if %{with tests} | |
59 | %{__python3} -m unittest | |
60 | %endif | |
3cadde8c JB |
61 | |
62 | %if %{with doc} | |
63 | %{__make} -C doc html | |
64 | %endif | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
3cadde8c | 69 | %py3_install |
3cadde8c JB |
70 | |
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
3cadde8c JB |
74 | %files |
75 | %defattr(644,root,root,755) | |
76 | %doc CHANGELOG.rst LICENSE README.rst | |
3cadde8c JB |
77 | %{py3_sitescriptdir}/elementpath |
78 | %{py3_sitescriptdir}/elementpath-%{version}-py*.egg-info | |
3cadde8c JB |
79 | |
80 | %if %{with doc} | |
81 | %files apidocs | |
82 | %defattr(644,root,root,755) | |
83 | %doc doc/_build/html/{_static,*.html,*.js} | |
84 | %endif |