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
|
|
|
#
|
2024-01-15 14:54:41 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
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
|
|
|
|
2023-04-23 03:37:17 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2007-01-16 00:34:06 +01:00
|
|
|
Name: python-lxml
|
2024-06-14 10:18:52 +02:00
|
|
|
Version: 5.2.2
|
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
|
2019-09-11 14:57:40 +02:00
|
|
|
URL: https://lxml.de/
|
2019-08-01 15:54:01 +02:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz
|
2021-01-24 11:59:08 +01:00
|
|
|
Source1: https://lxml.de/lxmldoc-4.5.2.pdf
|
2023-01-01 14:33:54 +01:00
|
|
|
Source99: python-lxml.rpmlintrc
|
2023-04-19 06:53:05 +02:00
|
|
|
# PATCH-FIX-OPENSUSE Skip a test under libxml2 2.10.4+
|
|
|
|
# https://bugs.launchpad.net/lxml/+bug/2016939
|
|
|
|
Patch1: skip-test-under-libxml2-2.10.4.patch
|
2023-05-04 18:51:26 +02:00
|
|
|
# PATCH-FIX-OPENSUSE Skip a test under libxml2 2.11.1+
|
|
|
|
# https://bugs.launchpad.net/lxml/+bug/2018522
|
|
|
|
Patch2: skip-test-under-libxml2-2.11.1.patch
|
2024-01-15 14:54:41 +01:00
|
|
|
BuildRequires: %{python_module Cython >= 3.0.7}
|
2022-09-19 13:36:36 +02:00
|
|
|
BuildRequires: %{python_module base}
|
2018-02-08 15:04:12 +01:00
|
|
|
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
|
2023-02-16 21:17:34 +01:00
|
|
|
%if 0%{?suse_version} == 1500
|
|
|
|
# Assume the best that the old libxml2 in SLE15 is patched for https://gitlab.gnome.org/GNOME/libxml2/-/issues/378 (CVE-2022-2309)
|
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
%else
|
2022-09-19 13:17:37 +02:00
|
|
|
BuildRequires: libxml2-devel >= 2.10.2
|
2023-02-16 21:17:34 +01:00
|
|
|
%endif
|
2022-12-29 23:41:01 +01:00
|
|
|
BuildRequires: libxslt-devel >= 1.1.27
|
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
|
|
|
|
2023-05-03 16:42:26 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2019-03-05 13:23:03 +01:00
|
|
|
%package -n %{name}-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
|
|
|
|
2019-03-05 13:23:03 +01:00
|
|
|
%description -n %{name}-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).
|
2023-05-03 16:42:26 +02:00
|
|
|
%endif
|
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
|
2023-01-20 17:02:18 +01:00
|
|
|
%autosetup -p1 -n lxml-%{version}
|
|
|
|
|
2011-09-02 14:10:18 +02:00
|
|
|
cp %{SOURCE1} .
|
2017-04-11 19:15:01 +02:00
|
|
|
|
|
|
|
# remove generated files
|
2019-07-04 10:39:37 +02:00
|
|
|
find -name '*.c' -delete -print
|
2017-04-11 19:15:01 +02:00
|
|
|
rm src/lxml/lxml.etree.h
|
|
|
|
rm src/lxml/lxml.etree_api.h
|
2007-01-16 00:34:06 +01:00
|
|
|
|
|
|
|
%build
|
2017-03-15 13:52:16 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
2024-01-25 15:00:53 +01:00
|
|
|
%python_build build_ext -i --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
|
2023-09-06 22:05:27 +02:00
|
|
|
# cyclic dependency between html5lib and lxml
|
|
|
|
rm -v src/lxml/html/tests/test_html5parser.py
|
2024-01-25 15:02:15 +01:00
|
|
|
%python_exec test.py
|
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
|
2022-12-29 23:41:01 +01:00
|
|
|
%python_expand %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
|
|
|
|
2023-05-03 16:42:26 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2019-03-05 13:23:03 +01:00
|
|
|
%files -n %{name}-doc
|
2018-08-07 21:51:24 +02:00
|
|
|
%license LICENSES.txt
|
2023-05-03 16:42:26 +02:00
|
|
|
%endif
|
2018-08-07 21:51:24 +02:00
|
|
|
%doc doc/html
|
2019-02-14 09:36:30 +01:00
|
|
|
%doc lxmldoc-*.pdf
|
2011-09-02 13:25:24 +02:00
|
|
|
|
2023-05-03 16:42:26 +02:00
|
|
|
%files %{python_files devel}
|
|
|
|
%license LICENSES.txt
|
|
|
|
%{python_sitearch}/lxml/*.h
|
|
|
|
%{python_sitearch}/lxml/includes/*.h
|
|
|
|
|
2007-07-30 20:58:23 +02:00
|
|
|
%changelog
|