]> git.pld-linux.org Git - packages/python-lxml.git/blame - python-lxml.spec
typo?
[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
9295daeb 4%bcond_without python2 # Python 2 package
c0e9fb36 5%bcond_without python3 # Python 3 package
9295daeb 6
7321ac76 7%define module lxml
c0e9fb36
JB
8Summary: Python 2 binding for the libxml2 and libxslt libraries
9Summary(pl.UTF-8): Wiązanie Pythona 2 do bibliotek libxml2 i libxslt
7321ac76 10Name: python-%{module}
5f3c21c8
ER
11Version: 3.6.0
12Release: 1
7321ac76 13License: BSD
eb4ef173 14Group: Libraries/Python
1c115bfe 15Source0: http://lxml.de/files/%{module}-%{version}.tgz
5f3c21c8 16# Source0-md5: 5957cc384bd6e83934be35c057ec03b6
1c115bfe 17URL: http://lxml.de/
d3b1534c
ER
18BuildRequires: libxml2-devel >= 1:2.9.2
19BuildRequires: libxslt-devel >= 1.1.28
ea280a0f 20%if %{with python2}
218fb629
JB
21BuildRequires: python-devel >= 1:2.6
22BuildRequires: python-modules >= 1:2.6
ea280a0f
AF
23%endif
24%if %{with python3}
a6453ed9 25BuildRequires: python3-Cython >= 0.17
218fb629
JB
26BuildRequires: python3-devel >= 1:3.2
27BuildRequires: python3-modules >= 1:3.2
ea280a0f 28%endif
7217b13f 29BuildRequires: rpm-pythonprov
a64792d2 30BuildRequires: rpmbuild(macros) >= 1.710
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
c0e9fb36
JB
39%package -n python3-%{module}
40Summary: Python 3 binding for the libxml2 and libxslt libraries
41Summary(pl.UTF-8): Wiązanie Pythona 3 do bibliotek libxml2 i libxslt
ea280a0f
AF
42Group: Libraries/Python
43
44%description -n python3-%{module}
45lxml is a Pythonic binding for the libxml2 and libxslt libraries.
46
47%description -n python3-%{module} -l pl.UTF-8
48lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
49
9295daeb
ER
50%package apidocs
51Summary: lxml API documentation
c0e9fb36 52Summary(pl.UTF-8): Dokumentacja API modułu lxml
9295daeb 53Group: Documentation
5f407b18
ER
54%if "%{_rpmversion}" >= "5"
55BuildArch: noarch
56%endif
9295daeb
ER
57
58%description apidocs
c0e9fb36
JB
59lxml API documentation.
60
61%description apidocs -l pl.UT8-8
62Dokumentacja API modułu lxml.
9295daeb 63
7321ac76
AM
64%prep
65%setup -q -n %{module}-%{version}
66
67%build
ea280a0f 68%if %{with python2}
9ffc2b4f 69%py_build
ea280a0f
AF
70%endif
71%if %{with python3}
9ffc2b4f 72%py3_build
ea280a0f 73%endif
7321ac76
AM
74
75%install
76rm -rf $RPM_BUILD_ROOT
7321ac76 77
ea280a0f 78%if %{with python2}
9ffc2b4f 79%py_install
7321ac76
AM
80
81%py_postclean
ea280a0f
AF
82%endif
83
84%if %{with python3}
9ffc2b4f 85%py3_install
ea280a0f 86%endif
7321ac76 87
9295daeb
ER
88# cleanup for packaging
89rm -rf docs
90cp -a doc docs
91# apidocs packaged separately
92rm -rf docs/html
93# build docs not useful at runtime
94rm docs/build.txt
95# common licenses
96rm docs/licenses/{BSD,GPL}.txt
97
7321ac76
AM
98%clean
99rm -rf $RPM_BUILD_ROOT
100
ea280a0f 101%if %{with python2}
7321ac76
AM
102%files
103%defattr(644,root,root,755)
c0e9fb36 104%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
0f893bb9
AM
105%dir %{py_sitedir}/lxml
106%{py_sitedir}/lxml/*.py[co]
c0e9fb36
JB
107%{py_sitedir}/lxml/lxml.etree*.h
108%{py_sitedir}/lxml/includes
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)
c0e9fb36 120%doc docs/* CHANGES.txt CREDITS.txt LICENSES.txt README.rst TODO.txt
ea280a0f 121%dir %{py3_sitedir}/lxml
c0e9fb36
JB
122%attr(755,root,root) %{py3_sitedir}/lxml/etree.cpython-*.so
123%attr(755,root,root) %{py3_sitedir}/lxml/objectify.cpython-*.so
ae91e877 124%{py3_sitedir}/lxml/*.py
38e20aab 125%{py3_sitedir}/lxml/__pycache__
c0e9fb36
JB
126%{py3_sitedir}/lxml/lxml.etree*.h
127%{py3_sitedir}/lxml/includes
ae91e877 128%{py3_sitedir}/lxml/isoschematron
129%{py3_sitedir}/lxml/html
ea280a0f
AF
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.065314 seconds and 4 git commands to generate.