]> git.pld-linux.org Git - packages/python-lxml.git/blame_incremental - python-lxml.spec
Release 2. Patch for https://bugs.launchpad.net/lxml/+bug/1250557 added.
[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 python2 # Python 2 package
5%bcond_without python3 # Python 3 package
6
7%define module lxml
8Summary: Python 2 binding for the libxml2 and libxslt libraries
9Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
10Name: python-%{module}
11Version: 3.2.4
12Release: 2
13License: BSD
14Group: Libraries/Python
15Source0: http://lxml.de/files/%{module}-%{version}.tgz
16# Source0-md5: cc363499060f615aca1ec8dcc04df331
17Patch0: %{name}-add-handle_failures-option-to-make_links_absolute-to.patch
18URL: http://lxml.de/
19BuildRequires: libxml2-devel >= 1:2.7.8
20BuildRequires: libxslt-devel >= 1.1.26
21%if %{with python2}
22BuildRequires: python-devel >= 1:2.4
23BuildRequires: python-modules
24%endif
25%if %{with python3}
26BuildRequires: python3-Cython > 0.17
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: Python 3 binding for the libxml2 and libxslt libraries
42Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
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
51%package apidocs
52Summary: lxml API documentation
53Summary(pl.UTF-8): Dokumentacja API modułu lxml
54Group: Documentation
55
56%description apidocs
57lxml API documentation.
58
59%description apidocs -l pl.UT8-8
60Dokumentacja API modułu lxml.
61
62%prep
63%setup -q -n %{module}-%{version}
64%patch0 -p1
65
66%build
67%if %{with python2}
68%{__python} setup.py build
69%endif
70%if %{with python3}
71%{__python3} setup.py build
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
77%if %{with python2}
78%{__python} setup.py \
79 install \
80 --root=$RPM_BUILD_ROOT \
81 --optimize=2
82
83%py_postclean
84%endif
85
86%if %{with python3}
87%{__python3} setup.py \
88 install \
89 --root=$RPM_BUILD_ROOT \
90 --optimize=2
91%endif
92
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
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%files
108%defattr(644,root,root,755)
109%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
110%dir %{py_sitedir}/lxml
111%{py_sitedir}/lxml/*.py[co]
112%{py_sitedir}/lxml/lxml.etree*.h
113%{py_sitedir}/lxml/includes
114%{py_sitedir}/lxml/isoschematron
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
119%{py_sitedir}/lxml-*.egg-info
120%endif
121
122%if %{with python3}
123%files -n python3-%{module}
124%defattr(644,root,root,755)
125%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
126%dir %{py3_sitedir}/lxml
127%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
128%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
129%{py3_sitedir}/lxml/*.py
130%{py3_sitedir}/lxml/__pycache__
131%{py3_sitedir}/lxml/lxml.etree*.h
132%{py3_sitedir}/lxml/includes
133%{py3_sitedir}/lxml/isoschematron
134%{py3_sitedir}/lxml/html
135%{py3_sitedir}/lxml-*.egg-info
136%endif
137
138%if %{with apidocs}
139%files apidocs
140%defattr(644,root,root,755)
141%doc doc/html/*
142%endif
This page took 0.027389 seconds and 4 git commands to generate.