# # spec file for package python-bleach # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, 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 http://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-bleach Version: 2.1.2 Release: 0 Summary: An easy safelist-based HTML-sanitizing tool License: Apache-2.0 Group: Development/Languages/Python Url: https://github.com/mozilla/bleach Source: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz Patch0: pytest-requirement.patch BuildRequires: %{python_module flake8 >= 3.3.0} BuildRequires: %{python_module html5lib} >= 1.0.1 BuildRequires: %{python_module pytest >= 3.0.0} BuildRequires: %{python_module pytest-runner} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros Requires: python-html5lib >= 1.0.1 Requires: python-six BuildArch: noarch %python_subpackages %description Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes. 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. %prep %setup -q -n bleach-%{version} %autopatch -p1 %build %python_build %install %python_install %check %python_exec setup.py test %files %{python_files} %doc README.rst CHANGES LICENSE %{python_sitelib}/* %changelog