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: 10924ab543397a06cb4cfaf9bdf0b80f
19 BuildRequires: libxml2-devel >= 1:2.9.2
20 BuildRequires: libxslt-devel >= 1.1.28
21 BuildRequires: pkgconfig
23 BuildRequires: python-Cython >= 0.29.7
24 BuildRequires: python-devel >= 1:2.7
25 BuildRequires: python-modules >= 1:2.7
26 BuildRequires: python-setuptools
29 BuildRequires: python3-Cython >= 0.29.7
30 BuildRequires: python3-devel >= 1:3.5
31 BuildRequires: python3-modules >= 1:3.5
32 BuildRequires: python3-setuptools
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.752
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
41 %description -l pl.UTF-8
42 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
44 %package -n python3-%{module}
45 Summary: Python 3 binding for the libxml2 and libxslt libraries
46 Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
47 Group: Libraries/Python
49 %description -n python3-%{module}
50 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
52 %description -n python3-%{module} -l pl.UTF-8
53 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
56 Summary: lxml API documentation
57 Summary(pl.UTF-8): Dokumentacja API modułu lxml
62 lxml API documentation.
64 %description apidocs -l pl.UT8-8
65 Dokumentacja API modułu lxml.
68 %setup -q -n %{module}-%{version}
75 install -d testdir-2/src/lxml
77 ln -snf ../../../build-2/lib.linux-*/lxml/* ../../../src/lxml/tests .
79 ln -snf ../doc ../samples ../test.py .
81 %{__python} test.py -v
90 install -d testdir-3/src/lxml
92 ln -snf ../../../build-3/lib.linux-*/lxml/* ../../../src/lxml/tests .
94 ln -snf ../doc ../samples ../test.py .
95 %{__python3} test.py -v
101 # as of 4.4.2, python3 is not supported in mkhtml.py
102 PYTHONPATH=$(echo $(pwd)/build-2/lib.linux-*) \
103 %{__python} doc/mkhtml.py doc/html $(pwd) %{version}
107 rm -rf $RPM_BUILD_ROOT
120 rm -rf $RPM_BUILD_ROOT
124 %defattr(644,root,root,755)
125 %doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
126 %dir %{py_sitedir}/lxml
127 %{py_sitedir}/lxml/*.py[co]
128 %{py_sitedir}/lxml/etree*.h
129 %{py_sitedir}/lxml/lxml.etree*.h
130 %{py_sitedir}/lxml/includes
131 %{py_sitedir}/lxml/isoschematron
132 %attr(755,root,root) %{py_sitedir}/lxml/_elementpath.so
133 %attr(755,root,root) %{py_sitedir}/lxml/builder.so
134 %attr(755,root,root) %{py_sitedir}/lxml/etree.so
135 %attr(755,root,root) %{py_sitedir}/lxml/objectify.so
136 %attr(755,root,root) %{py_sitedir}/lxml/sax.so
137 %dir %{py_sitedir}/lxml/html
138 %{py_sitedir}/lxml/html/*.py[co]
139 %attr(755,root,root) %{py_sitedir}/lxml/html/clean.so
140 %attr(755,root,root) %{py_sitedir}/lxml/html/diff.so
141 %{py_sitedir}/lxml-%{version}-py*.egg-info
145 %files -n python3-%{module}
146 %defattr(644,root,root,755)
147 %doc CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt doc/licenses/{BSD,ZopePublicLicense,elementtree}.txt
148 %dir %{py3_sitedir}/lxml
149 %attr(755,root,root) %{py3_sitedir}/lxml/_elementpath.cpython-*.so
150 %attr(755,root,root) %{py3_sitedir}/lxml/builder.cpython-*.so
151 %attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
152 %attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
153 %attr(755,root,root) %{py3_sitedir}/lxml/sax.cpython-*.so
154 %{py3_sitedir}/lxml/*.py
155 %{py3_sitedir}/lxml/__pycache__
156 %{py3_sitedir}/lxml/etree*.h
157 %{py3_sitedir}/lxml/lxml.etree*.h
158 %{py3_sitedir}/lxml/includes
159 %{py3_sitedir}/lxml/isoschematron
160 %dir %{py3_sitedir}/lxml/html
161 %{py3_sitedir}/lxml/html/*.py
162 %{py3_sitedir}/lxml/html/__pycache__
163 %attr(755,root,root) %{py3_sitedir}/lxml/html/clean.cpython-*.so
164 %attr(755,root,root) %{py3_sitedir}/lxml/html/diff.cpython-*.so
165 %{py3_sitedir}/lxml-%{version}-py*.egg-info
170 %defattr(644,root,root,755)