14
0
forked from pool/python-lxml

Accepting request 29143 from devel:languages:python

Copy from devel:languages:python/python-lxml based on submit request 29143 from user coolo

OBS-URL: https://build.opensuse.org/request/show/29143
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lxml?expand=0&rev=15
This commit is contained in:
OBS User autobuild
2010-01-12 11:52:54 +00:00
committed by Git OBS Bridge
parent 932dcd7862
commit 8bac1528a7
6 changed files with 93 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-lxml (Version 2.2.2)
# spec file for package python-lxml (Version 2.2.4)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 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
@@ -21,9 +21,9 @@
Name: python-lxml
Url: http://codespeak.net/lxml
Summary: A Pythonic Binding for the libxml2 and libxslt Libraries
Version: 2.2.2
Version: 2.2.4
Release: 1
License: BSD 3-clause (or similar)
License: BSD3c
Group: Development/Libraries/Python
Source: %{modname}-%{version}.tar.bz2
Source1: %{modname}doc-%{version}.pdf
@@ -33,6 +33,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: pyxml
# Requires: libxml2 libxslt
BuildRequires: libxslt-devel pyrex python-devel pyxml
BuildRequires: fdupes
# 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
@@ -49,23 +56,18 @@ Authors:
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)
Summary: Documentation for %{name}
License: BSD3c
%description doc
Documentation for python-lxml package
Documentation for %{modname} (HTML and PDF).
Authors:
--------
Stefan Behnel - main developer and maintainer
Martijn Faassen - creator of lxml and initial main developer
and others
% ---------------------------------
%prep
%setup -q -n %{modname}-%{version}
@@ -76,15 +78,19 @@ export CFLAGS="$RPM_OPT_FLAGS"
%install
%{__python} setup.py install \
--optimize 1 \
--prefix=%{_prefix} \
--root=$RPM_BUILD_ROOT \
--record-rpm=INSTALLED_FILES.txt
# Avoid warnings from rpmlint:
--record-rpm=INSTALLED_FILES.txt \
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
--install-lib=%{python_sitelib}
%endif
[ -e doc/rest2html.py ] && %{__mkdir} doc/examples && %{__mv} doc/rest2html.py doc/examples/
# Remove any duplicate files:
# Avoid warnings from rpmlint:
for i in doc/html/pubkey.asc ; do
[ -e "$i" ] && %{__rm} "$i"
done
%fdupes $RPM_BUILD_ROOT%{py_sitedir} $RPM_BUILD_ROOT%{python_sitelib}
%clean
%{__rm} -rf %{buildroot}