|
|
a0a4eec |
%bcond_without tests
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
Name: python-soupsieve
|
|
|
67fb3b8 |
Version: 2.2
|
|
|
fafa494 |
Release: %autorelease
|
|
|
cb1dcc7 |
Summary: CSS selector library
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
License: MIT
|
|
|
cb1dcc7 |
URL: https://github.com/facelessuser/soupsieve
|
|
|
cb1dcc7 |
Source0: https://github.com/facelessuser/soupsieve/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
BuildArch: noarch
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
BuildRequires: python3-devel
|
|
|
8548ee4 |
%if %{with tests}
|
|
|
cb1dcc7 |
BuildRequires: python3-pytest
|
|
|
cb1dcc7 |
BuildRequires: python3dist(lxml)
|
|
|
cb1dcc7 |
BuildRequires: python3dist(html5lib)
|
|
|
cb1dcc7 |
BuildRequires: python3dist(beautifulsoup4)
|
|
|
8548ee4 |
%endif
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%global _description %{expand:
|
|
|
cb1dcc7 |
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4.
|
|
|
cb1dcc7 |
It aims to provide selecting, matching, and filtering using modern CSS
|
|
|
cb1dcc7 |
selectors. Soup Sieve currently provides selectors from the CSS level 1
|
|
|
cb1dcc7 |
specifications up through the latest CSS level 4 drafts and beyond (though some
|
|
|
cb1dcc7 |
are not yet implemented).
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
Soup Sieve was written with the intent to replace Beautiful Soup's builtin
|
|
|
cb1dcc7 |
select feature, and as of Beautiful Soup version 4.7.0, it now is. Soup Sieve
|
|
|
cb1dcc7 |
can also be imported in order to use its API directly for more controlled,
|
|
|
cb1dcc7 |
specialized parsing.
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
Soup Sieve has implemented most of the CSS selectors up through the latest CSS
|
|
|
cb1dcc7 |
draft specifications, though there are a number that don't make sense in a
|
|
|
cb1dcc7 |
non-browser environment. Selectors that cannot provide meaningful functionality
|
|
|
cb1dcc7 |
simply do not match anything.}
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%description %_description
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%package -n python3-soupsieve
|
|
|
cb1dcc7 |
Summary: %{summary}
|
|
|
cb1dcc7 |
%{?python_provide:%python_provide python3-soupsieve}
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%description -n python3-soupsieve %_description
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%prep
|
|
|
cb1dcc7 |
%autosetup -n soupsieve-%{version}
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%build
|
|
|
cb1dcc7 |
%py3_build
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%install
|
|
|
cb1dcc7 |
%py3_install
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%if %{with tests}
|
|
|
cb1dcc7 |
%check
|
|
|
cb1dcc7 |
pytest-3 -v tests -k 'not test_namespace_xml_with_namespace'
|
|
|
cb1dcc7 |
%endif
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%files -n python3-soupsieve
|
|
|
cb1dcc7 |
%{python3_sitelib}/soupsieve/
|
|
|
a93fe5b |
%{python3_sitelib}/soupsieve*.egg-info/
|
|
|
cb1dcc7 |
%doc README.md
|
|
|
cb1dcc7 |
%license LICENSE.md
|
|
|
cb1dcc7 |
|
|
|
cb1dcc7 |
%changelog
|
|
|
fafa494 |
%autochangelog
|