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