1 # TODO: use system html5lib
4 %bcond_without doc # Sphinx documentation
5 %bcond_without tests # unit tests
7 Summary: An easy safelist-based HTML-sanitizing tool
8 Summary(pl.UTF-8): Proste, oparte na liście elementów bezpiecznych, narzędzie do porządkowania HTML-a
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/bleach/
15 Source0: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz
16 # Source0-md5: 97322e672e4b285e6354c40d07166fc4
17 URL: https://pypi.org/project/bleach/
18 BuildRequires: python3-modules >= 1:3.7
19 BuildRequires: python3-setuptools
21 BuildRequires: python3-pytest >= 3.0.0
22 BuildRequires: python3-six >= 1.9
23 BuildRequires: python3-webencodings
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
28 BuildRequires: sphinx-pdg-3
30 Requires: python3-modules >= 1:3.7
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Bleach is an allowed-list-based HTML sanitizing library that escapes
36 or strips markup and attributes.
38 %description -l pl.UTF-8
39 Bleach to oparta na liście elementów dozwolonych biblioteka
40 zabezpieczająca lub usuwająca znaczniki i atrybuty.
43 Summary: API documentation for Python bleach module
44 Summary(pl.UTF-8): Dokumentacja API modułu Pythona bleach
48 API documentation for Python bleach module.
50 %description apidocs -l pl.UTF-8
51 Dokumentacja API modułu Pythona bleach.
54 %setup -q -n bleach-%{version}
60 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
61 %{__python3} -m pytest tests
65 %{__make} -C docs html \
66 SPHINXBUILD=sphinx-build-3
70 rm -rf $RPM_BUILD_ROOT
75 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
79 %doc CHANGES CONTRIBUTORS LICENSE README.rst SECURITY.md
80 %{py3_sitescriptdir}/bleach
81 %{py3_sitescriptdir}/bleach-%{version}-py*.egg-info
85 %defattr(644,root,root,755)
86 %doc docs/_build/html/{_modules,_static,*.html,*.js}