]> git.pld-linux.org Git - packages/python-lxml.git/blame - python-lxml.spec
- updated to 4.9.1
[packages/python-lxml.git] / python-lxml.spec
CommitLineData
7321ac76 1#
9295daeb 2# Conditional build:
4c2d4999 3%bcond_without apidocs # API documentation
9295daeb 4%bcond_without python2 # Python 2 package
c0e9fb36 5%bcond_without python3 # Python 3 package
b471452b 6%bcond_without tests # unit tests
9295daeb 7
7321ac76 8%define module lxml
c0e9fb36
JB
9Summary: Python 2 binding for the libxml2 and libxslt libraries
10Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
7321ac76 11Name: python-%{module}
ec5415e6
JB
12Version: 4.9.1
13Release: 1
7321ac76 14License: BSD
eb4ef173 15Group: Libraries/Python
b4e20e30
JB
16#Source0Download: https://pypi.org/simple/lxml/
17Source0: https://files.pythonhosted.org/packages/source/l/lxml/%{module}-%{version}.tar.gz
ec5415e6 18# Source0-md5: e27240a7319d80d0c1e5390ca31eb1d8
4c2d4999 19URL: https://lxml.de/
d3b1534c
ER
20BuildRequires: libxml2-devel >= 1:2.9.2
21BuildRequires: libxslt-devel >= 1.1.28
5342f174 22BuildRequires: pkgconfig
ea280a0f 23%if %{with python2}
ec5415e6 24BuildRequires: python-Cython >= 0.29.30
5342f174
JB
25BuildRequires: python-devel >= 1:2.7
26BuildRequires: python-modules >= 1:2.7
4c2d4999 27BuildRequires: python-setuptools
ea280a0f
AF
28%endif
29%if %{with python3}
ec5415e6 30BuildRequires: python3-Cython >= 0.29.30
5342f174
JB
31BuildRequires: python3-devel >= 1:3.5
32BuildRequires: python3-modules >= 1:3.5
4c2d4999 33BuildRequires: python3-setuptools
ea280a0f 34%endif
7217b13f 35BuildRequires: rpm-pythonprov
5342f174 36BuildRequires: rpmbuild(macros) >= 1.752
7321ac76
AM
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40lxml is a Pythonic binding for the libxml2 and libxslt libraries.
41
8b26c81f
JR
42%description -l pl.UTF-8
43lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
459884ee 44
c0e9fb36
JB
45%package -n python3-%{module}
46Summary: Python 3 binding for the libxml2 and libxslt libraries
47Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
ea280a0f
AF
48Group: Libraries/Python
49
50%description -n python3-%{module}
51lxml is a Pythonic binding for the libxml2 and libxslt libraries.
52
53%description -n python3-%{module} -l pl.UTF-8
54lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
55
9295daeb
ER
56%package apidocs
57Summary: lxml API documentation
c0e9fb36 58Summary(pl.UTF-8): Dokumentacja API modułu lxml
9295daeb 59Group: Documentation
d50a3f3a 60BuildArch: noarch
9295daeb
ER
61
62%description apidocs
c0e9fb36
JB
63lxml API documentation.
64
65%description apidocs -l pl.UT8-8
66Dokumentacja API modułu lxml.
9295daeb 67
7321ac76
AM
68%prep
69%setup -q -n %{module}-%{version}
70
71%build
ea280a0f 72%if %{with python2}
9ffc2b4f 73%py_build
4c2d4999
JB
74
75%if %{with tests}
b471452b
JB
76install -d testdir-2/src/lxml
77cd testdir-2/src/lxml
78ln -snf ../../../build-2/lib.linux-*/lxml/* ../../../src/lxml/tests .
79cd ../..
80ln -snf ../doc ../samples ../test.py .
81LC_ALL=C.UTF-8 \
82%{__python} test.py -v
83cd ..
4c2d4999 84%endif
ea280a0f 85%endif
4c2d4999 86
ea280a0f 87%if %{with python3}
9ffc2b4f 88%py3_build
4c2d4999
JB
89
90%if %{with tests}
b471452b
JB
91install -d testdir-3/src/lxml
92cd testdir-3/src/lxml
93ln -snf ../../../build-3/lib.linux-*/lxml/* ../../../src/lxml/tests .
94cd ../..
95ln -snf ../doc ../samples ../test.py .
96%{__python3} test.py -v
97cd ..
4c2d4999 98%endif
ea280a0f 99%endif
7321ac76 100
b471452b
JB
101%if %{with apidocs}
102# as of 4.4.2, python3 is not supported in mkhtml.py
103PYTHONPATH=$(echo $(pwd)/build-2/lib.linux-*) \
104%{__python} doc/mkhtml.py doc/html $(pwd) %{version}
105%endif
106
7321ac76
AM
107%install
108rm -rf $RPM_BUILD_ROOT
7321ac76 109
ea280a0f 110%if %{with python2}
9ffc2b4f 111%py_install
7321ac76
AM
112
113%py_postclean
ea280a0f
AF
114%endif
115
116%if %{with python3}
9ffc2b4f 117%py3_install
ea280a0f 118%endif
7321ac76
AM
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
ea280a0f 123%if %{with python2}
7321ac76
AM
124%files
125%defattr(644,root,root,755)
9cafda48 126%doc CHANGES.txt CREDITS.txt LICENSE.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,elementtree}.txt
0f893bb9
AM
127%dir %{py_sitedir}/lxml
128%{py_sitedir}/lxml/*.py[co]
00a14e75 129%{py_sitedir}/lxml/etree*.h
c0e9fb36
JB
130%{py_sitedir}/lxml/lxml.etree*.h
131%{py_sitedir}/lxml/includes
ae91e877 132%{py_sitedir}/lxml/isoschematron
00a14e75
JB
133%attr(755,root,root) %{py_sitedir}/lxml/_elementpath.so
134%attr(755,root,root) %{py_sitedir}/lxml/builder.so
75dd257f
MB
135%attr(755,root,root) %{py_sitedir}/lxml/etree.so
136%attr(755,root,root) %{py_sitedir}/lxml/objectify.so
b471452b 137%attr(755,root,root) %{py_sitedir}/lxml/sax.so
00a14e75
JB
138%dir %{py_sitedir}/lxml/html
139%{py_sitedir}/lxml/html/*.py[co]
140%attr(755,root,root) %{py_sitedir}/lxml/html/clean.so
141%attr(755,root,root) %{py_sitedir}/lxml/html/diff.so
142%{py_sitedir}/lxml-%{version}-py*.egg-info
ea280a0f
AF
143%endif
144
145%if %{with python3}
146%files -n python3-%{module}
147%defattr(644,root,root,755)
9cafda48 148%doc CHANGES.txt CREDITS.txt LICENSE.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,elementtree}.txt
ea280a0f 149%dir %{py3_sitedir}/lxml
00a14e75
JB
150%attr(755,root,root) %{py3_sitedir}/lxml/_elementpath.cpython-*.so
151%attr(755,root,root) %{py3_sitedir}/lxml/builder.cpython-*.so
c0e9fb36
JB
152%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
153%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
b471452b 154%attr(755,root,root) %{py3_sitedir}/lxml/sax.cpython-*.so
ae91e877 155%{py3_sitedir}/lxml/*.py
38e20aab 156%{py3_sitedir}/lxml/__pycache__
00a14e75 157%{py3_sitedir}/lxml/etree*.h
c0e9fb36
JB
158%{py3_sitedir}/lxml/lxml.etree*.h
159%{py3_sitedir}/lxml/includes
ae91e877 160%{py3_sitedir}/lxml/isoschematron
00a14e75
JB
161%dir %{py3_sitedir}/lxml/html
162%{py3_sitedir}/lxml/html/*.py
163%{py3_sitedir}/lxml/html/__pycache__
164%attr(755,root,root) %{py3_sitedir}/lxml/html/clean.cpython-*.so
165%attr(755,root,root) %{py3_sitedir}/lxml/html/diff.cpython-*.so
166%{py3_sitedir}/lxml-%{version}-py*.egg-info
ea280a0f 167%endif
9295daeb
ER
168
169%if %{with apidocs}
170%files apidocs
171%defattr(644,root,root,755)
172%doc doc/html/*
173%endif
This page took 0.083634 seconds and 4 git commands to generate.