2011-10-09 12:04:50 +02:00
|
|
|
#
|
2022-03-30 10:08:39 +02:00
|
|
|
# spec file
|
2012-01-31 11:55:03 +01:00
|
|
|
#
|
2023-02-17 17:55:02 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-01-31 11:55:03 +01: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.
|
2013-03-26 09:00:03 +01:00
|
|
|
|
2018-12-04 14:53:45 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-10-09 12:04:50 +02:00
|
|
|
#
|
|
|
|
|
2013-03-26 09:00:03 +01:00
|
|
|
|
2022-08-19 19:38:18 +02:00
|
|
|
%define skip_python2 1
|
2019-02-25 10:01:13 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
2015-07-20 08:54:23 +02:00
|
|
|
%bcond_with test
|
2019-02-25 10:01:13 +01:00
|
|
|
%endif
|
2023-04-23 02:53:52 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-02-25 10:01:13 +01:00
|
|
|
Name: python-pyquery%{psuffix}
|
2023-04-20 09:27:23 +02:00
|
|
|
Version: 2.0.0
|
2012-01-31 11:55:03 +01:00
|
|
|
Release: 0
|
2011-10-09 12:04:50 +02:00
|
|
|
Summary: A jQuery-like library for python
|
2013-03-26 09:00:03 +01:00
|
|
|
License: BSD-3-Clause
|
2019-11-27 16:09:29 +01:00
|
|
|
URL: https://pypi.python.org/pypi/pyquery
|
2017-05-01 17:36:08 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pyquery/pyquery-%{version}.tar.gz
|
2023-02-17 17:55:02 +01:00
|
|
|
# PATCH-FIX-OPENSUSE make_webtest_optional.patch mcepl@suse.com
|
|
|
|
# Make it possible to run test suite (albeit partial) without WebTest module
|
|
|
|
Patch0: make_webtest_optional.patch
|
2023-04-20 09:27:23 +02:00
|
|
|
BuildRequires: %{python_module cssselect >= 1.2.0}
|
2017-05-01 17:36:08 +02:00
|
|
|
BuildRequires: %{python_module lxml >= 2.1}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-08-13 15:19:04 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2023-04-20 09:27:23 +02:00
|
|
|
Requires: python-cssselect >= 1.2.0
|
2018-08-13 15:19:04 +02:00
|
|
|
Requires: python-lxml >= 2.1
|
|
|
|
BuildArch: noarch
|
2015-07-20 08:54:23 +02:00
|
|
|
%if %{with test}
|
2019-02-25 09:58:28 +01:00
|
|
|
BuildRequires: %{python_module WebOb > 1.1.9}
|
2020-08-16 19:31:04 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-02-25 09:58:28 +01:00
|
|
|
BuildRequires: %{python_module requests}
|
2023-02-17 17:55:02 +01:00
|
|
|
%if 0%{?suse_version} > 1550
|
|
|
|
BuildRequires: %{python_module WebTest}
|
|
|
|
%endif
|
2015-07-20 08:54:23 +02:00
|
|
|
%endif
|
2017-05-01 17:36:08 +02:00
|
|
|
%python_subpackages
|
2011-03-05 08:03:08 +01:00
|
|
|
|
|
|
|
%description
|
2012-01-31 11:55:03 +01:00
|
|
|
Pyquery allows you to make jQuery queries on XML documents. The API is
|
|
|
|
as much as possible the similar to jQuery. Pyquery uses lxml for fast
|
2011-10-09 12:04:50 +02:00
|
|
|
XML and HTML manipulation.
|
2011-03-05 08:03:08 +01:00
|
|
|
|
|
|
|
%prep
|
2023-02-17 17:55:02 +01:00
|
|
|
%autosetup -p1 -n pyquery-%{version}
|
2011-03-05 08:03:08 +01:00
|
|
|
|
|
|
|
%build
|
2017-05-01 17:36:08 +02:00
|
|
|
%python_build
|
2011-03-05 08:03:08 +01:00
|
|
|
|
|
|
|
%install
|
2019-02-25 10:01:13 +01:00
|
|
|
%if !%{with test}
|
2017-05-01 17:36:08 +02:00
|
|
|
%python_install
|
2018-08-13 15:19:04 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-02-25 10:01:13 +01:00
|
|
|
%endif
|
2011-03-05 08:03:08 +01:00
|
|
|
|
2015-07-20 08:54:23 +02:00
|
|
|
%if %{with test}
|
2015-05-16 14:54:00 +02:00
|
|
|
%check
|
2019-02-25 09:58:28 +01:00
|
|
|
# Disable tests which perform live fetch
|
2023-04-20 09:27:23 +02:00
|
|
|
# test_selector_html uses XML namespaces, which are broken with libxml2 2.10.4+
|
|
|
|
%pytest -k 'not (test_get or test_selector_html)' tests
|
2015-07-20 08:54:23 +02:00
|
|
|
%endif
|
2015-05-16 14:54:00 +02:00
|
|
|
|
2019-02-25 10:01:13 +01:00
|
|
|
%if !%{with test}
|
2017-05-01 17:36:08 +02:00
|
|
|
%files %{python_files}
|
2019-02-25 09:58:28 +01:00
|
|
|
%license LICENSE.txt
|
2013-03-26 09:00:03 +01:00
|
|
|
%doc CHANGES.rst README.rst
|
2019-11-27 16:09:29 +01:00
|
|
|
%{python_sitelib}/pyquery/
|
2022-08-19 19:38:18 +02:00
|
|
|
%{python_sitelib}/pyquery-%{version}*-info
|
2019-02-25 10:01:13 +01:00
|
|
|
%endif
|
2011-03-05 08:03:08 +01:00
|
|
|
|
2011-10-09 12:04:50 +02:00
|
|
|
%changelog
|