- updated to 3.2.5
[packages/python-lxml.git] / python-lxml.spec
CommitLineData
7321ac76 1#
9295daeb
ER
2# Conditional build:
3%bcond_without apidocs # do not build and package API docs
9295daeb 4%bcond_without python2 # Python 2 package
c0e9fb36 5%bcond_without python3 # Python 3 package
9295daeb 6
7321ac76 7%define module lxml
c0e9fb36
JB
8Summary: Python 2 binding for the libxml2 and libxslt libraries
9Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
7321ac76 10Name: python-%{module}
cb8d4381
ŁK
11Version: 3.2.5
12Release: 1
7321ac76 13License: BSD
eb4ef173 14Group: Libraries/Python
1c115bfe 15Source0: http://lxml.de/files/%{module}-%{version}.tgz
cb8d4381 16# Source0-md5: 6c4fb9b1840631cff09b8229a12a9ef7
6ada93df 17Patch0: %{name}-add-handle_failures-option-to-make_links_absolute-to.patch
1c115bfe 18URL: http://lxml.de/
c0e9fb36
JB
19BuildRequires: libxml2-devel >= 1:2.7.8
20BuildRequires: libxslt-devel >= 1.1.26
ea280a0f 21%if %{with python2}
c0e9fb36 22BuildRequires: python-devel >= 1:2.4
7217b13f 23BuildRequires: python-modules
ea280a0f
AF
24%endif
25%if %{with python3}
339d4628 26BuildRequires: python3-Cython > 0.17
ea280a0f
AF
27BuildRequires: python3-devel
28BuildRequires: python3-modules
29%endif
7217b13f 30BuildRequires: rpm-pythonprov
7321ac76 31BuildRequires: rpmbuild(macros) >= 1.219
7321ac76
AM
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35lxml is a Pythonic binding for the libxml2 and libxslt libraries.
36
8b26c81f
JR
37%description -l pl.UTF-8
38lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
459884ee 39
c0e9fb36
JB
40%package -n python3-%{module}
41Summary: Python 3 binding for the libxml2 and libxslt libraries
42Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
ea280a0f
AF
43Group: Libraries/Python
44
45%description -n python3-%{module}
46lxml is a Pythonic binding for the libxml2 and libxslt libraries.
47
48%description -n python3-%{module} -l pl.UTF-8
49lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
50
9295daeb
ER
51%package apidocs
52Summary: lxml API documentation
c0e9fb36 53Summary(pl.UTF-8): Dokumentacja API modułu lxml
9295daeb
ER
54Group: Documentation
55
56%description apidocs
c0e9fb36
JB
57lxml API documentation.
58
59%description apidocs -l pl.UT8-8
60Dokumentacja API modułu lxml.
9295daeb 61
7321ac76
AM
62%prep
63%setup -q -n %{module}-%{version}
6ada93df 64%patch0 -p1
7321ac76
AM
65
66%build
ea280a0f
AF
67%if %{with python2}
68%{__python} setup.py build
69%endif
70%if %{with python3}
71%{__python3} setup.py build
72%endif
7321ac76
AM
73
74%install
75rm -rf $RPM_BUILD_ROOT
7321ac76 76
ea280a0f
AF
77%if %{with python2}
78%{__python} setup.py \
79 install \
7321ac76
AM
80 --root=$RPM_BUILD_ROOT \
81 --optimize=2
82
83%py_postclean
ea280a0f
AF
84%endif
85
86%if %{with python3}
87%{__python3} setup.py \
88 install \
89 --root=$RPM_BUILD_ROOT \
90 --optimize=2
ea280a0f 91%endif
7321ac76 92
9295daeb
ER
93# cleanup for packaging
94rm -rf docs
95cp -a doc docs
96# apidocs packaged separately
97rm -rf docs/html
98# build docs not useful at runtime
99rm docs/build.txt
100# common licenses
101rm docs/licenses/{BSD,GPL}.txt
102
7321ac76
AM
103%clean
104rm -rf $RPM_BUILD_ROOT
105
ea280a0f 106%if %{with python2}
7321ac76
AM
107%files
108%defattr(644,root,root,755)
c0e9fb36 109%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
0f893bb9
AM
110%dir %{py_sitedir}/lxml
111%{py_sitedir}/lxml/*.py[co]
c0e9fb36
JB
112%{py_sitedir}/lxml/lxml.etree*.h
113%{py_sitedir}/lxml/includes
ae91e877 114%{py_sitedir}/lxml/isoschematron
75dd257f
MB
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
31980435 119%{py_sitedir}/lxml-*.egg-info
ea280a0f
AF
120%endif
121
122%if %{with python3}
123%files -n python3-%{module}
124%defattr(644,root,root,755)
c0e9fb36 125%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
ea280a0f 126%dir %{py3_sitedir}/lxml
c0e9fb36
JB
127%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
128%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
ae91e877 129%{py3_sitedir}/lxml/*.py
38e20aab 130%{py3_sitedir}/lxml/__pycache__
c0e9fb36
JB
131%{py3_sitedir}/lxml/lxml.etree*.h
132%{py3_sitedir}/lxml/includes
ae91e877 133%{py3_sitedir}/lxml/isoschematron
134%{py3_sitedir}/lxml/html
ea280a0f
AF
135%{py3_sitedir}/lxml-*.egg-info
136%endif
9295daeb
ER
137
138%if %{with apidocs}
139%files apidocs
140%defattr(644,root,root,755)
141%doc doc/html/*
142%endif
This page took 0.068191 seconds and 4 git commands to generate.