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