Package approved
This commit is contained in:
parent
6de0c47c29
commit
cb1dcc738c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/python-soupsieve-1.9.2.tar.gz
|
||||
91
python-soupsieve.spec
Normal file
91
python-soupsieve.spec
Normal file
@ -0,0 +1,91 @@
|
||||
%bcond_with tests
|
||||
|
||||
Name: python-soupsieve
|
||||
Version: 1.9.2
|
||||
Release: 1%{?dist}
|
||||
Summary: CSS selector library
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/facelessuser/soupsieve
|
||||
Source0: https://github.com/facelessuser/soupsieve/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3dist(lxml)
|
||||
BuildRequires: python3dist(html5lib)
|
||||
BuildRequires: python3dist(beautifulsoup4)
|
||||
|
||||
%global _description %{expand:
|
||||
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4.
|
||||
It aims to provide selecting, matching, and filtering using modern CSS
|
||||
selectors. Soup Sieve currently provides selectors from the CSS level 1
|
||||
specifications up through the latest CSS level 4 drafts and beyond (though some
|
||||
are not yet implemented).
|
||||
|
||||
Soup Sieve was written with the intent to replace Beautiful Soup's builtin
|
||||
select feature, and as of Beautiful Soup version 4.7.0, it now is. Soup Sieve
|
||||
can also be imported in order to use its API directly for more controlled,
|
||||
specialized parsing.
|
||||
|
||||
Soup Sieve has implemented most of the CSS selectors up through the latest CSS
|
||||
draft specifications, though there are a number that don't make sense in a
|
||||
non-browser environment. Selectors that cannot provide meaningful functionality
|
||||
simply do not match anything.}
|
||||
|
||||
%description %_description
|
||||
|
||||
%package -n python2-soupsieve
|
||||
Summary: %{summary}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-pytest
|
||||
BuildRequires: python2dist(lxml)
|
||||
BuildRequires: python2dist(html5lib)
|
||||
BuildRequires: python2dist(beautifulsoup4)
|
||||
BuildRequires: python2dist(backports.functools-lru-cache)
|
||||
Requires: python2dist(backports.functools-lru-cache)
|
||||
%{?python_provide:%python_provide python2-soupsieve}
|
||||
|
||||
%description -n python2-soupsieve %_description
|
||||
|
||||
%package -n python3-soupsieve
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-soupsieve}
|
||||
|
||||
%description -n python3-soupsieve %_description
|
||||
|
||||
%prep
|
||||
%autosetup -n soupsieve-%{version}
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
# We need to exclude one test which requires bs4 >= 4.7, because
|
||||
# bs4 >= 4.7 also requires this package to build.
|
||||
pytest-2 -v tests -k 'not test_namespace_xml_with_namespace'
|
||||
pytest-3 -v tests -k 'not test_namespace_xml_with_namespace'
|
||||
%endif
|
||||
|
||||
%files -n python2-soupsieve
|
||||
%{python2_sitelib}/soupsieve/
|
||||
%{python2_sitelib}/soupsieve-%{version}-py%{python2_version}.egg-info/
|
||||
%doc README.md
|
||||
%license LICENSE.md
|
||||
|
||||
%files -n python3-soupsieve
|
||||
%{python3_sitelib}/soupsieve/
|
||||
%{python3_sitelib}/soupsieve-%{version}-py%{python3_version}.egg-info/
|
||||
%doc README.md
|
||||
%license LICENSE.md
|
||||
|
||||
%changelog
|
||||
* Mon Jun 10 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.9.2-1
|
||||
- Initial packaging
|
||||
Loading…
Reference in New Issue
Block a user