python-lxml/python-lxml.spec

101 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-lxml (Version 2.2.2)
#
# Copyright (c) 2009 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
Url: http://codespeak.net/lxml
Summary: A Pythonic Binding for the libxml2 and libxslt Libraries
Version: 2.2.2
Release: 1
License: BSD 3-clause (or similar)
Group: Development/Libraries/Python
Source: %{modname}-%{version}.tar.bz2
Source1: %{modname}doc-%{version}.pdf
Source2: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
Requires: pyxml
# Requires: libxml2 libxslt
BuildRequires: libxslt-devel pyrex python-devel pyxml
%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.
Authors:
--------
Stefan Behnel - main developer and maintainer
Martijn Faassen - creator of lxml and initial main developer
and others
%package doc
Group: Development/Libraries/Python
Summary: Documentation for python-lxml Package
License: BSD 3-clause (or similar)
%description doc
Documentation for python-lxml package
Authors:
--------
Stefan Behnel - main developer and maintainer
Martijn Faassen - creator of lxml and initial main developer
and others
% ---------------------------------
%prep
%setup -q -n %{modname}-%{version}
%build
export CFLAGS="$RPM_OPT_FLAGS"
%{__python} setup.py build
%{__cp} %{S:1} .
%install
%{__python} setup.py install \
--prefix=%{_prefix} \
--root=$RPM_BUILD_ROOT \
--record-rpm=INSTALLED_FILES.txt
# Avoid warnings from rpmlint:
[ -e doc/rest2html.py ] && %{__mkdir} doc/examples && %{__mv} doc/rest2html.py doc/examples/
# Remove any duplicate files:
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