]> git.pld-linux.org Git - packages/python-lxml.git/blob - python-lxml.spec
- release 4
[packages/python-lxml.git] / python-lxml.spec
1 #
2 %bcond_without  python3
3 %bcond_without  python2
4 %define         module  lxml
5 #
6 Summary:        A Pythonic binding for the libxml2 and libxslt libraries
7 Summary(pl.UTF-8):      Pythonowe wiązanie do bibliotek libxml2 i libxslt
8 Name:           python-%{module}
9 Version:        2.2.6
10 Release:        4
11 License:        BSD
12 Group:          Libraries/Python
13 Source0:        http://codespeak.net/lxml/%{module}-%{version}.tgz
14 # Source0-md5:  b1f700fb22d7ee9b977ee3eceb65b20c
15 Patch0:         python3.patch
16 URL:            http://codespeak.net/lxml/
17 BuildRequires:  libxml2-devel
18 BuildRequires:  libxslt-devel
19 %if %{with python2}
20 BuildRequires:  python-devel
21 BuildRequires:  python-modules
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-Cython
25 BuildRequires:  python3-devel
26 BuildRequires:  python3-modules
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.219
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
34
35 %description -l pl.UTF-8
36 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
37
38 %package -n     python3-%{module}
39 Summary:        A Pythonic binding for the libxml2 and libxslt libraries
40 Summary(pl.UTF-8):      Pythonowe wiązanie do bibliotek libxml2 i libxslt
41 Version:        %{version}
42 Release:        %{release}
43 Group:          Libraries/Python
44
45 %description -n python3-%{module}
46 lxml is a Pythonic binding for the libxml2 and libxslt libraries.
47
48 %description -n python3-%{module} -l pl.UTF-8
49 lxml to pythonowe wiązanie do bibliotek libxml2 i libxslt.
50
51 %prep
52 %setup -q -n %{module}-%{version}
53 %patch0 -p1
54
55 %build
56 %if %{with python2}
57 %{__python} setup.py build
58 %endif
59 %if %{with python3}
60 %{__python3} setup.py build
61 %endif
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 %if %{with python2}
67 %{__python} setup.py \
68         install \
69         --root=$RPM_BUILD_ROOT \
70         --optimize=2
71
72 %py_postclean
73 %endif
74
75 %if %{with python3}
76 %{__python3} setup.py \
77         install \
78         --root=$RPM_BUILD_ROOT \
79         --optimize=2
80
81 %py3_postclean
82 %endif
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %files
89 %defattr(644,root,root,755)
90 %doc doc/* CHANGES.txt CREDITS.txt TODO.txt
91 %dir %{py_sitedir}/lxml
92 %{py_sitedir}/lxml/*.py[co]
93 %dir %{py_sitedir}/lxml/html
94 %{py_sitedir}/lxml/html/*.py[co]
95 %attr(755,root,root) %{py_sitedir}/lxml/etree.so
96 %attr(755,root,root) %{py_sitedir}/lxml/objectify.so
97 %{py_sitedir}/lxml-*.egg-info
98 %endif
99
100 %if %{with python3}
101 %files -n python3-%{module}
102 %defattr(644,root,root,755)
103 %doc doc/* CHANGES.txt CREDITS.txt TODO.txt
104 %dir %{py3_sitedir}/lxml
105 %{py3_sitedir}/lxml/*.py[co]
106 %dir %{py3_sitedir}/lxml/html
107 %{py3_sitedir}/lxml/html/*.py[co]
108 %attr(755,root,root) %{py3_sitedir}/lxml/etree.so
109 %attr(755,root,root) %{py3_sitedir}/lxml/objectify.so
110 %{py3_sitedir}/lxml-*.egg-info
111 %endif
This page took 0.032952 seconds and 3 git commands to generate.