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