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: 88c75f4c73fc8f59c9ebb17495044f2f
18 BuildRequires: libxml2-devel >= 1:2.7.8
19 BuildRequires: libxslt-devel >= 1.1.26
21 BuildRequires: python-devel >= 1:2.4
22 BuildRequires: python-modules
25 BuildRequires: python3-Cython > 0.17
26 BuildRequires: python3-devel
27 BuildRequires: python3-modules
29 BuildRequires: rpm-pythonprov
30 BuildRequires: rpmbuild(macros) >= 1.219
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
36 %description -l pl.UTF-8
37 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
39 %package -n python3-%{module}
40 Summary: Python 3 binding for the libxml2 and libxslt libraries
41 Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
42 Group: Libraries/Python
44 %description -n python3-%{module}
45 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
47 %description -n python3-%{module} -l pl.UTF-8
48 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
51 Summary: lxml API documentation
52 Summary(pl.UTF-8): Dokumentacja API modułu lxml
54 %if "%{_rpmversion}" >= "5"
59 lxml API documentation.
61 %description apidocs -l pl.UT8-8
62 Dokumentacja API modułu lxml.
65 %setup -q -n %{module}-%{version}
69 %{__python} setup.py build
72 %{__python3} setup.py build
76 rm -rf $RPM_BUILD_ROOT
79 %{__python} setup.py \
81 --root=$RPM_BUILD_ROOT \
88 %{__python3} setup.py \
90 --root=$RPM_BUILD_ROOT \
94 # cleanup for packaging
97 # apidocs packaged separately
99 # build docs not useful at runtime
102 rm docs/licenses/{BSD,GPL}.txt
105 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
111 %dir %{py_sitedir}/lxml
112 %{py_sitedir}/lxml/*.py[co]
113 %{py_sitedir}/lxml/lxml.etree*.h
114 %{py_sitedir}/lxml/includes
115 %{py_sitedir}/lxml/isoschematron
116 %dir %{py_sitedir}/lxml/html
117 %{py_sitedir}/lxml/html/*.py[co]
118 %attr(755,root,root) %{py_sitedir}/lxml/etree.so
119 %attr(755,root,root) %{py_sitedir}/lxml/objectify.so
120 %{py_sitedir}/lxml-*.egg-info
124 %files -n python3-%{module}
125 %defattr(644,root,root,755)
126 %doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
127 %dir %{py3_sitedir}/lxml
128 %attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
129 %attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
130 %{py3_sitedir}/lxml/*.py
131 %{py3_sitedir}/lxml/__pycache__
132 %{py3_sitedir}/lxml/lxml.etree*.h
133 %{py3_sitedir}/lxml/includes
134 %{py3_sitedir}/lxml/isoschematron
135 %{py3_sitedir}/lxml/html
136 %{py3_sitedir}/lxml-*.egg-info
141 %defattr(644,root,root,755)