forked from pool/python-bleach
		
	- Add de-vendor.patch to avoid new vendoring of html5lib in v3.1.0 - Remove direct dependency on webencodings, a dependency of html5lib - Update to v3.1.0 OBS-URL: https://build.opensuse.org/request/show/681074 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bleach?expand=0&rev=24
		
			
				
	
	
		
			80 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			RPMSpec
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			RPMSpec
		
	
	
	
	
	
#
 | 
						|
# spec file for package python-bleach
 | 
						|
#
 | 
						|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 | 
						|
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
 | 
						|
#
 | 
						|
# 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.
 | 
						|
 | 
						|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
 | 
						|
#
 | 
						|
 | 
						|
 | 
						|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 | 
						|
Name:           python-bleach
 | 
						|
Version:        3.1.0
 | 
						|
Release:        0
 | 
						|
Summary:        A whitelist-based HTML-sanitizing tool
 | 
						|
License:        Apache-2.0
 | 
						|
Group:          Development/Languages/Python
 | 
						|
URL:            http://github.com/jsocol/bleach
 | 
						|
Source:         https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz
 | 
						|
Patch0:         de-vendor.patch
 | 
						|
BuildRequires:  %{python_module html5lib >= 1.0.0}
 | 
						|
BuildRequires:  %{python_module pytest >= 3.0.0}
 | 
						|
BuildRequires:  %{python_module pytest-runner >= 2.0}
 | 
						|
BuildRequires:  %{python_module setuptools}
 | 
						|
BuildRequires:  %{python_module six >= 1.9}
 | 
						|
BuildRequires:  fdupes
 | 
						|
BuildRequires:  python-rpm-macros
 | 
						|
Requires:       python-html5lib >= 1.0.0
 | 
						|
Requires:       python-six >= 1.9
 | 
						|
BuildArch:      noarch
 | 
						|
%python_subpackages
 | 
						|
 | 
						|
%description
 | 
						|
Bleach is an HTML sanitation library that escapes or strips markup and
 | 
						|
attributes based on a white list. Bleach can also linkify text safely, applying
 | 
						|
filters that Django's ``urlize`` filter cannot, and optionally setting ``rel``
 | 
						|
attributes, even on links already in the text.
 | 
						|
 | 
						|
Bleach is intended for sanitizing text from *untrusted* sources.
 | 
						|
 | 
						|
Because it relies on html5lib, Bleach is as good as modern browsers at dealing
 | 
						|
with weird, quirky HTML fragments. Bleach's methods will fix
 | 
						|
unbalanced or mis-nested tags.
 | 
						|
 | 
						|
Documentation is at http://bleach.readthedocs.org/ .
 | 
						|
 | 
						|
%prep
 | 
						|
%setup -q -n bleach-%{version}
 | 
						|
%patch0 -p1
 | 
						|
rm -rf bleach/_vendor
 | 
						|
 | 
						|
%build
 | 
						|
%python_build
 | 
						|
 | 
						|
%install
 | 
						|
%python_install
 | 
						|
 | 
						|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
 | 
						|
 | 
						|
%check
 | 
						|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
 | 
						|
py.test-%{$python_bin_suffix}
 | 
						|
}
 | 
						|
 | 
						|
%files %{python_files}
 | 
						|
%license LICENSE
 | 
						|
%doc CHANGES README.rst
 | 
						|
%{python_sitelib}/*
 | 
						|
 | 
						|
%changelog
 |