55331ce048
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lxml?expand=0&rev=26
102 lines
3.1 KiB
RPMSpec
102 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-lxml
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define modname lxml
|
|
|
|
Name: python-lxml
|
|
Version: 2.3
|
|
Release: 1
|
|
License: BSD3c
|
|
Summary: A Pythonic Binding for the libxml2 and libxslt Libraries
|
|
Url: http://codespeak.net/lxml
|
|
Group: Development/Libraries/Python
|
|
Source: %{modname}-%{version}.tar.bz2
|
|
Source1: %{modname}doc-%{version}.pdf
|
|
Source2: %{name}-rpmlintrc
|
|
# Requires: libxml2 libxslt
|
|
BuildRequires: libxslt-devel
|
|
BuildRequires: pyrex
|
|
BuildRequires: python-devel
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%{py_requires}
|
|
# Use test as told in http://lists.opensuse.org/opensuse-packaging/2009-08/msg00110.html
|
|
|
|
#%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
|
|
#BuildArch: noarch
|
|
#%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
#%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")}
|
|
#%endif
|
|
|
|
#
|
|
|
|
%description
|
|
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It
|
|
follows the ElementTree API as much as possible, building it on top of
|
|
the native libxml2 tree. It also extends this API to expose libxml2 and
|
|
libxslt specific functionality, such as XPath, Relax NG, XML Schema,
|
|
XSLT, and c14n.
|
|
|
|
Author:
|
|
-------
|
|
Stefan Behnel - main developer and maintainer
|
|
Martijn Faassen - creator of lxml and initial main developer
|
|
and others
|
|
|
|
%package doc
|
|
License: BSD3c
|
|
Summary: Documentation for %{name}
|
|
Group: Development/Libraries/Python
|
|
|
|
%description doc
|
|
Documentation for %{modname} (HTML and PDF).
|
|
|
|
# ---------------------------------
|
|
%prep
|
|
%setup -q -n %{modname}-%{version}
|
|
|
|
%build
|
|
export CFLAGS="%{optflags}"
|
|
%{__python} setup.py build
|
|
%{__cp} %{S:1} .
|
|
|
|
%install
|
|
%{__python} setup.py install \
|
|
--optimize 1 \
|
|
--prefix=%{_prefix} \
|
|
--root=%{buildroot} \
|
|
--record-rpm=INSTALLED_FILES.txt
|
|
|
|
[ -e doc/rest2html.py ] && %{__mkdir} doc/examples && %{__mv} doc/rest2html.py doc/examples/
|
|
|
|
for i in doc/html/pubkey.asc ; do
|
|
[ -e "$i" ] && %{__rm} "$i"
|
|
done
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files -f INSTALLED_FILES.txt
|
|
%defattr(-,root,root)
|
|
%doc CHANGES.txt CREDITS.txt LICENSES.txt README.txt TODO.txt
|
|
|
|
%files doc
|
|
%defattr(-,root,root)
|
|
%doc doc/html doc/examples doc/*.* benchmark %{modname}doc-%{version}.pdf
|
|
|
|
%changelog
|