2007-01-16 00:34:06 +01:00
|
|
|
#
|
2011-03-08 10:39:28 +01:00
|
|
|
# spec file for package python-lxml
|
2007-01-16 00:34:06 +01:00
|
|
|
#
|
2018-02-08 15:04:12 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:34:06 +01:00
|
|
|
#
|
2008-09-26 16:55:39 +02:00
|
|
|
# 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.
|
2011-12-12 10:03:16 +01:00
|
|
|
|
2018-12-04 14:39:24 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:34:06 +01:00
|
|
|
#
|
|
|
|
|
2011-12-12 10:03:16 +01:00
|
|
|
|
2017-03-15 13:52:16 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2007-01-16 00:34:06 +01:00
|
|
|
Name: python-lxml
|
2018-11-16 20:14:40 +01:00
|
|
|
Version: 4.2.5
|
2012-03-09 22:29:46 +01:00
|
|
|
Release: 0
|
2017-09-12 17:24:53 +02:00
|
|
|
Summary: Pythonic XML processing library
|
2018-03-19 15:13:54 +01:00
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later
|
2011-09-02 13:25:24 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-03-19 15:13:54 +01:00
|
|
|
Url: http://lxml.de/
|
2017-04-07 20:43:14 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz
|
2017-07-31 08:02:44 +02:00
|
|
|
Source1: http://lxml.de/lxmldoc-%{version}.pdf
|
2018-09-03 20:18:30 +02:00
|
|
|
Patch0: 0001-Make-test-more-resilient-against-changes-in-latest-l.patch
|
2018-02-08 15:04:12 +01:00
|
|
|
BuildRequires: %{python_module Cython >= 0.26.1}
|
|
|
|
BuildRequires: %{python_module cssselect >= 0.9.1}
|
2017-03-15 13:52:16 +01:00
|
|
|
BuildRequires: %{python_module setuptools >= 18.0.1}
|
2017-09-19 16:14:01 +02:00
|
|
|
BuildRequires: fdupes
|
2014-11-05 15:09:18 +01:00
|
|
|
BuildRequires: libxml2-devel >= 2.7.0
|
|
|
|
BuildRequires: libxslt-devel >= 1.1.23
|
2017-03-15 13:52:16 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2015-08-03 11:54:31 +02:00
|
|
|
Requires: python-cssselect >= 0.9.1
|
2017-03-15 13:52:16 +01:00
|
|
|
%python_subpackages
|
2010-03-02 01:44:48 +01:00
|
|
|
|
2007-01-16 00:34:06 +01:00
|
|
|
%description
|
2017-09-12 17:24:53 +02:00
|
|
|
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It
|
|
|
|
provides convenient access to these libraries using the ElementTree
|
2011-09-02 13:25:24 +02:00
|
|
|
API. It extends the ElementTree API significantly to offer support for XPath,
|
2017-09-12 17:24:53 +02:00
|
|
|
RelaxNG, XML Schema, XSLT and C14N.
|
2007-01-16 00:34:06 +01:00
|
|
|
|
2008-04-03 02:15:51 +02:00
|
|
|
%package doc
|
2017-09-12 17:24:53 +02:00
|
|
|
Summary: Documentation for python-lxml, an XML processing library
|
2018-08-07 21:51:24 +02:00
|
|
|
Group: Documentation/Other
|
2012-12-19 16:46:10 +01:00
|
|
|
BuildArch: noarch
|
2008-04-03 02:15:51 +02:00
|
|
|
|
|
|
|
%description doc
|
2017-09-12 17:24:53 +02:00
|
|
|
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It
|
|
|
|
provides convenient access to these libraries using the ElementTree
|
2011-09-02 13:25:24 +02:00
|
|
|
API. It extends the ElementTree API significantly to offer support for XPath,
|
2017-09-12 17:24:53 +02:00
|
|
|
RelaxNG, XML Schema, XSLT and C14N.
|
2011-09-02 13:25:24 +02:00
|
|
|
|
|
|
|
This package contains documentation for lxml (HTML and PDF).
|
2008-04-03 02:15:51 +02:00
|
|
|
|
2015-09-02 16:07:58 +02:00
|
|
|
%package devel
|
2017-09-12 17:24:53 +02:00
|
|
|
Summary: Development files for python-lxml
|
2015-09-02 16:07:58 +02:00
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
2017-09-12 17:24:53 +02:00
|
|
|
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It
|
|
|
|
provides convenient access to these libraries using the ElementTree
|
2015-09-02 16:07:58 +02:00
|
|
|
API. It extends the ElementTree API significantly to offer support for XPath,
|
2017-09-12 17:24:53 +02:00
|
|
|
RelaxNG, XML Schema, XSLT and C14N.
|
2015-09-02 16:07:58 +02:00
|
|
|
|
|
|
|
This package contains header files needed to use lxml's C API.
|
|
|
|
|
2007-01-16 00:34:06 +01:00
|
|
|
%prep
|
2011-09-02 13:25:24 +02:00
|
|
|
%setup -q -n lxml-%{version}
|
2018-03-19 15:13:54 +01:00
|
|
|
%patch0 -p1
|
2011-09-02 14:10:18 +02:00
|
|
|
cp %{SOURCE1} .
|
2017-04-11 19:15:01 +02:00
|
|
|
|
|
|
|
# remove generated files
|
2017-09-19 16:14:01 +02:00
|
|
|
# rm src/lxml/lxml.etree.c
|
2017-04-11 19:15:01 +02:00
|
|
|
rm src/lxml/lxml.etree.h
|
|
|
|
rm src/lxml/lxml.etree_api.h
|
2017-09-19 16:14:01 +02:00
|
|
|
# rm src/lxml/lxml.objectify.c
|
2007-01-16 00:34:06 +01:00
|
|
|
|
|
|
|
%build
|
2017-03-15 13:52:16 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
2017-04-11 19:15:01 +02:00
|
|
|
%python_build --with-cython
|
2007-01-16 00:34:06 +01:00
|
|
|
|
2014-03-03 16:50:51 +01:00
|
|
|
%check
|
2018-03-19 15:13:54 +01:00
|
|
|
# The tests fail on SLE 11 due to broken incremental parsing in libxml2
|
2017-03-15 13:52:16 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
2017-10-31 15:25:20 +01:00
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
export PYTHONUNBUFFERED=x
|
|
|
|
%if 0%{?have_python2}
|
2018-02-08 15:04:12 +01:00
|
|
|
make %{?_smp_mflags} test
|
2017-10-31 15:25:20 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?have_python3}
|
2018-02-08 15:04:12 +01:00
|
|
|
make %{?_smp_mflags} test3
|
2017-10-31 15:25:20 +01:00
|
|
|
%endif
|
2014-03-03 16:50:51 +01:00
|
|
|
|
2007-01-16 00:34:06 +01:00
|
|
|
%install
|
2017-03-15 13:52:16 +01:00
|
|
|
%python_install
|
2017-09-19 16:14:01 +02:00
|
|
|
%fdupes %{buildroot}
|
2008-04-03 02:15:51 +02:00
|
|
|
|
2017-03-15 13:52:16 +01:00
|
|
|
%files %{python_files}
|
2018-03-19 15:13:54 +01:00
|
|
|
%license LICENSES.txt
|
|
|
|
%doc CHANGES.txt CREDITS.txt README.rst
|
2012-05-25 09:07:29 +02:00
|
|
|
%{python_sitearch}/lxml/
|
2017-03-15 13:52:16 +01:00
|
|
|
%{python_sitearch}/lxml-%{version}-py%{python_version}.egg-info
|
2013-04-02 11:02:25 +02:00
|
|
|
%exclude %{python_sitearch}/lxml/*.h
|
|
|
|
%exclude %{python_sitearch}/lxml/includes/*.h
|
2012-03-09 22:29:46 +01:00
|
|
|
|
2017-03-15 13:52:16 +01:00
|
|
|
%files %{python_files devel}
|
2018-08-07 21:51:24 +02:00
|
|
|
%license LICENSES.txt
|
2015-09-02 16:07:58 +02:00
|
|
|
%{python_sitearch}/lxml/*.h
|
|
|
|
%{python_sitearch}/lxml/includes/*.h
|
|
|
|
|
2017-03-15 13:52:16 +01:00
|
|
|
%files %{python_files doc}
|
2018-08-07 21:51:24 +02:00
|
|
|
%license LICENSES.txt
|
|
|
|
%doc doc/html
|
|
|
|
%doc lxmldoc-%{version}.pdf
|
2011-09-02 13:25:24 +02:00
|
|
|
|
2007-07-30 20:58:23 +02:00
|
|
|
%changelog
|