3 %bcond_without apidocs # do not build and package API docs
4 %bcond_without python2 # Python 2 package
5 %bcond_without python3 # Python 3 package
8 Summary: Python 2 binding for the libxml2 and libxslt libraries
9 Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: http://lxml.de/files/%{module}-%{version}.tgz
16 # Source0-md5: cc363499060f615aca1ec8dcc04df331
17 Patch0: %{name}-add-handle_failures-option-to-make_links_absolute-to.patch
19 BuildRequires: libxml2-devel >= 1:2.7.8
20 BuildRequires: libxslt-devel >= 1.1.26
22 BuildRequires: python-devel >= 1:2.4
23 BuildRequires: python-modules
26 BuildRequires: python3-Cython > 0.17
27 BuildRequires: python3-devel
28 BuildRequires: python3-modules
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.219
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
37 %description -l pl.UTF-8
38 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
40 %package -n python3-%{module}
41 Summary: Python 3 binding for the libxml2 and libxslt libraries
42 Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
43 Group: Libraries/Python
45 %description -n python3-%{module}
46 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
48 %description -n python3-%{module} -l pl.UTF-8
49 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
52 Summary: lxml API documentation
53 Summary(pl.UTF-8): Dokumentacja API modułu lxml
57 lxml API documentation.
59 %description apidocs -l pl.UT8-8
60 Dokumentacja API modułu lxml.
63 %setup -q -n %{module}-%{version}
68 %{__python} setup.py build
71 %{__python3} setup.py build
75 rm -rf $RPM_BUILD_ROOT
78 %{__python} setup.py \
80 --root=$RPM_BUILD_ROOT \
87 %{__python3} setup.py \
89 --root=$RPM_BUILD_ROOT \
93 # cleanup for packaging
96 # apidocs packaged separately
98 # build docs not useful at runtime
101 rm docs/licenses/{BSD,GPL}.txt
104 rm -rf $RPM_BUILD_ROOT
108 %defattr(644,root,root,755)
109 %doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
110 %dir %{py_sitedir}/lxml
111 %{py_sitedir}/lxml/*.py[co]
112 %{py_sitedir}/lxml/lxml.etree*.h
113 %{py_sitedir}/lxml/includes
114 %{py_sitedir}/lxml/isoschematron
115 %dir %{py_sitedir}/lxml/html
116 %{py_sitedir}/lxml/html/*.py[co]
117 %attr(755,root,root) %{py_sitedir}/lxml/etree.so
118 %attr(755,root,root) %{py_sitedir}/lxml/objectify.so
119 %{py_sitedir}/lxml-*.egg-info
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
126 %dir %{py3_sitedir}/lxml
127 %attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
128 %attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
129 %{py3_sitedir}/lxml/*.py
130 %{py3_sitedir}/lxml/__pycache__
131 %{py3_sitedir}/lxml/lxml.etree*.h
132 %{py3_sitedir}/lxml/includes
133 %{py3_sitedir}/lxml/isoschematron
134 %{py3_sitedir}/lxml/html
135 %{py3_sitedir}/lxml-*.egg-info
140 %defattr(644,root,root,755)