]> git.pld-linux.org Git - packages/python-lxml.git/blame_incremental - python-lxml.spec
- Version 2.3.2-1.
[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.3.2
12Release: 1
13License: BSD
14Group: Libraries/Python
15Source0: http://codespeak.net/lxml/%{module}-%{version}.tgz
16# Source0-md5: 50ed3706da4665c40600fd6e2a7d1159
17URL: http://codespeak.net/lxml/
18BuildRequires: libxml2-devel
19BuildRequires: libxslt-devel
20%if %{with python2}
21BuildRequires: python-devel
22BuildRequires: python-modules
23%endif
24%if %{with python3}
25BuildRequires: python3-Cython
26BuildRequires: python3-devel
27BuildRequires: python3-modules
28%endif
29BuildRequires: rpm-pythonprov
30BuildRequires: rpmbuild(macros) >= 1.219
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34lxml is a Pythonic binding for the libxml2 and libxslt libraries.
35
36%description -l pl.UTF-8
37lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
38
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
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
60%prep
61%setup -q -n %{module}-%{version}
62
63%build
64%if %{with python2}
65%{__python} setup.py build
66%endif
67%if %{with python3}
68%{__python3} setup.py build
69%endif
70
71%install
72rm -rf $RPM_BUILD_ROOT
73
74%if %{with python2}
75%{__python} setup.py \
76 install \
77 --root=$RPM_BUILD_ROOT \
78 --optimize=2
79
80%py_postclean
81%endif
82
83%if %{with python3}
84%{__python3} setup.py \
85 install \
86 --root=$RPM_BUILD_ROOT \
87 --optimize=2
88%endif
89
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
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%if %{with python2}
104%files
105%defattr(644,root,root,755)
106%doc docs/* CHANGES.txt CREDITS.txt TODO.txt
107%dir %{py_sitedir}/lxml
108%{py_sitedir}/lxml/*.py[co]
109%{py_sitedir}/lxml/isoschematron
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
114%{py_sitedir}/lxml-*.egg-info
115%endif
116
117%if %{with python3}
118%files -n python3-%{module}
119%defattr(644,root,root,755)
120%doc docs/* CHANGES.txt CREDITS.txt TODO.txt
121%dir %{py3_sitedir}/lxml
122%attr(755,root,root) %{py3_sitedir}/lxml/*.so
123%{py3_sitedir}/lxml/*.py
124%{py3_sitedir}/lxml/__pycache__
125%{py3_sitedir}/lxml/isoschematron
126%{py3_sitedir}/lxml/html
127%{py3_sitedir}/lxml-*.egg-info
128%endif
129
130%if %{with apidocs}
131%files apidocs
132%defattr(644,root,root,755)
133%doc doc/html/*
134%endif
This page took 0.028389 seconds and 4 git commands to generate.