]> git.pld-linux.org Git - packages/python-lxml.git/blame_incremental - python-lxml.spec
- apidocs subpackage
[packages/python-lxml.git] / python-lxml.spec
... / ...
CommitLineData
1#
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
7%define module lxml
8Summary: A Pythonic binding for the libxml2 and libxslt libraries
9Summary(pl.UTF-8): Pythonowe wiązanie do bibliotek libxml2 i libxslt
10Name: python-%{module}
11Version: 2.2.7
12Release: 2
13License: BSD
14Group: Libraries/Python
15Source0: http://codespeak.net/lxml/%{module}-%{version}.tgz
16# Source0-md5: c1da56b823fdc00804938d2b788dbfd0
17Patch0: python3.patch
18URL: http://codespeak.net/lxml/
19BuildRequires: libxml2-devel
20BuildRequires: libxslt-devel
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-modules
24%endif
25%if %{with python3}
26BuildRequires: python3-Cython
27BuildRequires: python3-devel
28BuildRequires: python3-modules
29%endif
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.219
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35lxml is a Pythonic binding for the libxml2 and libxslt libraries.
36
37%description -l pl.UTF-8
38lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
39
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
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
61%prep
62%setup -q -n %{module}-%{version}
63%patch0 -p1
64
65%build
66%if %{with python2}
67%{__python} setup.py build
68%endif
69%if %{with python3}
70%{__python3} setup.py build
71%endif
72
73%install
74rm -rf $RPM_BUILD_ROOT
75
76%if %{with python2}
77%{__python} setup.py \
78 install \
79 --root=$RPM_BUILD_ROOT \
80 --optimize=2
81
82%py_postclean
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
93
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
104%clean
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
108%files
109%defattr(644,root,root,755)
110%doc docs/* CHANGES.txt CREDITS.txt TODO.txt
111%dir %{py_sitedir}/lxml
112%{py_sitedir}/lxml/*.py[co]
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
117%{py_sitedir}/lxml-*.egg-info
118%endif
119
120%if %{with python3}
121%files -n python3-%{module}
122%defattr(644,root,root,755)
123%doc docs/* CHANGES.txt CREDITS.txt TODO.txt
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
132
133%if %{with apidocs}
134%files apidocs
135%defattr(644,root,root,755)
136%doc doc/html/*
137%endif
This page took 0.030712 seconds and 4 git commands to generate.