3 %bcond_without apidocs # API documentation
4 %bcond_without python2 # Python 2 package
5 %bcond_without python3 # Python 3 package
6 %bcond_without tests # unit tests
9 Summary: Python 2 binding for the libxml2 and libxslt libraries
10 Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://lxml.de/files/%{module}-%{version}.tgz
17 # Source0-md5: 235c1a22d97a174144e76b66ce62ae46
19 BuildRequires: libxml2-devel >= 1:2.9.2
20 BuildRequires: libxslt-devel >= 1.1.28
22 BuildRequires: python-Cython >= 0.29.7
23 BuildRequires: python-devel >= 1:2.6
24 BuildRequires: python-modules >= 1:2.6
25 BuildRequires: python-setuptools
28 BuildRequires: python3-Cython >= 0.29.7
29 BuildRequires: python3-devel >= 1:3.3
30 BuildRequires: python3-modules >= 1:3.3
31 BuildRequires: python3-setuptools
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.710
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
40 %description -l pl.UTF-8
41 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
43 %package -n python3-%{module}
44 Summary: Python 3 binding for the libxml2 and libxslt libraries
45 Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
46 Group: Libraries/Python
48 %description -n python3-%{module}
49 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
51 %description -n python3-%{module} -l pl.UTF-8
52 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
55 Summary: lxml API documentation
56 Summary(pl.UTF-8): Dokumentacja API modułu lxml
58 %if "%{_rpmversion}" >= "5"
63 lxml API documentation.
65 %description apidocs -l pl.UT8-8
66 Dokumentacja API modułu lxml.
69 %setup -q -n %{module}-%{version}
76 install -d testdir-2/src/lxml
78 ln -snf ../../../build-2/lib.linux-*/lxml/* ../../../src/lxml/tests .
80 ln -snf ../doc ../samples ../test.py .
82 %{__python} test.py -v
91 install -d testdir-3/src/lxml
93 ln -snf ../../../build-3/lib.linux-*/lxml/* ../../../src/lxml/tests .
95 ln -snf ../doc ../samples ../test.py .
96 %{__python3} test.py -v
102 # as of 4.4.2, python3 is not supported in mkhtml.py
103 PYTHONPATH=$(echo $(pwd)/build-2/lib.linux-*) \
104 %{__python} doc/mkhtml.py doc/html $(pwd) %{version}
108 rm -rf $RPM_BUILD_ROOT
121 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
127 %dir %{py_sitedir}/lxml
128 %{py_sitedir}/lxml/*.py[co]
129 %{py_sitedir}/lxml/etree*.h
130 %{py_sitedir}/lxml/lxml.etree*.h
131 %{py_sitedir}/lxml/includes
132 %{py_sitedir}/lxml/isoschematron
133 %attr(755,root,root) %{py_sitedir}/lxml/_elementpath.so
134 %attr(755,root,root) %{py_sitedir}/lxml/builder.so
135 %attr(755,root,root) %{py_sitedir}/lxml/etree.so
136 %attr(755,root,root) %{py_sitedir}/lxml/objectify.so
137 %attr(755,root,root) %{py_sitedir}/lxml/sax.so
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
146 %files -n python3-%{module}
147 %defattr(644,root,root,755)
148 %doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
149 %dir %{py3_sitedir}/lxml
150 %attr(755,root,root) %{py3_sitedir}/lxml/_elementpath.cpython-*.so
151 %attr(755,root,root) %{py3_sitedir}/lxml/builder.cpython-*.so
152 %attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
153 %attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
154 %attr(755,root,root) %{py3_sitedir}/lxml/sax.cpython-*.so
155 %{py3_sitedir}/lxml/*.py
156 %{py3_sitedir}/lxml/__pycache__
157 %{py3_sitedir}/lxml/etree*.h
158 %{py3_sitedir}/lxml/lxml.etree*.h
159 %{py3_sitedir}/lxml/includes
160 %{py3_sitedir}/lxml/isoschematron
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
171 %defattr(644,root,root,755)