- Build against Cython instead of pyrex

- Don't repackage source tarball
- Remove unneeded rpmlint filters

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=33
This commit is contained in:
Sascha Peilicke 2011-09-02 11:25:24 +00:00 committed by Git OBS Bridge
parent 588a0cafd2
commit 28bec3bf63
5 changed files with 47 additions and 80 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db726624c5763f7d5d173fec309666fe25c1aa3b21b1b25481e5ea331a195d92
size 2232964

3
lxml-2.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eea1b8d29532739c1383cb4794c5eacd6176f0972b59e8d29348335b87ff2e66
size 3187747

View File

@ -1,13 +0,0 @@
#
addFilter("files-duplicate .*/toc-lxml.html.usedoctest-module.html")
addFilter("files-duplicate .*/html/api/frames.html")
# Fix false positives:
addFilter("files-duplicate .*/lxml/html/.*")
addFilter("files-duplicate .*/lxml/sax.py?")
addFilter("files-duplicate .*/lxml/usedoctest.py?")
addFilter("files-duplicate .*/lxml/pyclasslookup.py?")
addFilter("files-duplicate .*/lxml/ElementInclude.py?")
addFilter("files-duplicate .*/lxml/__init__.py?")
addFilter("files-duplicate .*/lxml/_elementpath.py?")
addFilter("files-duplicate .*/lxml/doctestcompare.py?")

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Sep 2 11:06:52 UTC 2011 - saschpe@suse.de
- Build against Cython instead of pyrex
- Don't repackage source tarball
- Remove unneeded rpmlint filters
-------------------------------------------------------------------
Tue Aug 30 18:40:26 UTC 2011 - andrea.turrini@gmail.com

View File

@ -11,91 +11,64 @@
# 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
Release: 0
Url: http://lxml.de/
Summary: Powerful and Pythonic XML processing library
License: BSD-3-Clause
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/l/lxml/lxml-%{version}.tar.gz
Source1: lxmldoc-%{version}.pdf
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
#
BuildRequires: python-devel
BuildRequires: libxslt-devel
BuildRequires: python-Cython
%if 0%{?suse_version}
%py_requires
%endif
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%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
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
provides safe and convenient access to these libraries using the ElementTree
API. It extends the ElementTree API significantly to offer support for XPath,
RelaxNG, XML Schema, XSLT, C14N and much more.
%package doc
License: BSD3c
Summary: Documentation for %{name}
Summary: Powerful and Pythonic XML processing library - Documentation
Group: Development/Libraries/Python
%description doc
Documentation for %{modname} (HTML and PDF).
lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
provides safe and convenient access to these libraries using the ElementTree
API. It extends the ElementTree API significantly to offer support for XPath,
RelaxNG, XML Schema, XSLT, C14N and much more.
This package contains documentation for lxml (HTML and PDF).
# ---------------------------------
%prep
%setup -q -n %{modname}-%{version}
%setup -q -n lxml-%{version}
%build
export CFLAGS="%{optflags}"
%{__python} setup.py build
%{__cp} %{S:1} .
CFLAGS="%{optflags}" python setup.py build
%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
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -Dm0644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}-doc/lxml-%{version}.pdf # Install PDF into docdir
%files doc
%defattr(-,root,root)
%doc doc/html doc/examples doc/*.* benchmark %{modname}doc-%{version}.pdf
%doc doc/html
%{_docdir}/%{name}-doc/lxml-%{version}.pdf
%files
%defattr(-,root,root,-)
%doc CHANGES.txt CREDITS.txt IDEAS.txt LICENSES.txt README.txt TODO.txt
%{python_sitearch}/*
%changelog