2016-06-03 06:50:25 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-parsel
|
|
|
|
|
#
|
2021-03-15 08:18:34 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2016-06-03 06:50:25 +00: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.
|
|
|
|
|
|
2018-12-04 13:44:54 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-06-03 06:50:25 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2017-12-21 23:26:17 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-04-20 11:27:39 +00:00
|
|
|
%bcond_without python2
|
2016-06-03 06:50:25 +00:00
|
|
|
Name: python-parsel
|
2021-08-25 11:31:23 +00:00
|
|
|
Version: 1.6.0
|
2016-06-03 06:50:25 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Library to extract data from HTML and XML using XPath and CSS selectors
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
Group: Development/Languages/Python
|
2018-11-17 16:05:58 +00:00
|
|
|
URL: https://github.com/scrapy/parsel
|
2017-12-21 23:26:17 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/parsel/parsel-%{version}.tar.gz
|
2021-03-15 08:18:34 +00:00
|
|
|
BuildRequires: %{python_module cssselect >= 0.9}
|
2017-12-21 23:26:17 +00:00
|
|
|
BuildRequires: %{python_module lxml}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-08-25 11:31:23 +00:00
|
|
|
BuildRequires: %{python_module six >= 1.6.0}
|
2021-03-15 08:18:34 +00:00
|
|
|
BuildRequires: %{python_module w3lib >= 1.8.0}
|
2017-12-21 23:26:17 +00:00
|
|
|
BuildRequires: fdupes
|
2017-12-21 23:36:20 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2016-06-03 06:50:25 +00:00
|
|
|
Requires: python-cssselect >= 0.9
|
|
|
|
|
Requires: python-lxml
|
2021-08-25 11:31:23 +00:00
|
|
|
Requires: python-six >= 1.6.0
|
2016-06-03 06:50:25 +00:00
|
|
|
Requires: python-w3lib >= 1.8.0
|
2019-09-11 08:28:47 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%ifpython2
|
2018-11-17 16:05:58 +00:00
|
|
|
Requires: python-functools32
|
|
|
|
|
%endif
|
|
|
|
|
# SECTION test requirements
|
2018-12-04 13:44:54 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-04-20 11:27:39 +00:00
|
|
|
%if %{with python2}
|
2018-11-17 16:05:58 +00:00
|
|
|
BuildRequires: python-functools32
|
2020-04-20 11:27:39 +00:00
|
|
|
%endif
|
2018-11-17 16:05:58 +00:00
|
|
|
# /SECTION
|
2017-12-21 23:26:17 +00:00
|
|
|
%python_subpackages
|
2016-06-03 06:50:25 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-12-21 23:26:17 +00:00
|
|
|
Parsel is a library to extract data from HTML and XML using XPath and CSS
|
|
|
|
|
selectors.
|
2016-06-03 06:50:25 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n parsel-%{version}
|
2020-04-20 11:27:39 +00:00
|
|
|
sed -i -e '/pytest-runner/d' setup.py
|
2016-06-03 06:50:25 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-12-21 23:26:17 +00:00
|
|
|
%python_build
|
2016-06-03 06:50:25 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-12-21 23:26:17 +00:00
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2020-04-20 11:27:39 +00:00
|
|
|
%pytest
|
2016-06-03 06:50:25 +00:00
|
|
|
|
2017-12-21 23:26:17 +00:00
|
|
|
%files %{python_files}
|
2018-04-06 08:40:04 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
2016-06-03 06:50:25 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|