]> git.pld-linux.org Git - SPECS.git/blob - python3-bleach.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / python3-bleach.spec
1 # TODO: use system html5lib
2 #
3 # Conditional build:
4 %bcond_without  doc     # Sphinx documentation
5 %bcond_without  tests   # unit tests
6
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
9 Name:           python3-bleach
10 Version:        5.0.0
11 Release:        1
12 License:        Apache v2.0
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
20 %if %{with tests}
21 BuildRequires:  python3-pytest >= 3.0.0
22 BuildRequires:  python3-six >= 1.9
23 BuildRequires:  python3-webencodings
24 %endif
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.714
27 %if %{with doc}
28 BuildRequires:  sphinx-pdg-3
29 %endif
30 Requires:       python3-modules >= 1:3.7
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Bleach is an allowed-list-based HTML sanitizing library that escapes
36 or strips markup and attributes.
37
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.
41
42 %package apidocs
43 Summary:        API documentation for Python bleach module
44 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona bleach
45 Group:          Documentation
46
47 %description apidocs
48 API documentation for Python bleach module.
49
50 %description apidocs -l pl.UTF-8
51 Dokumentacja API modułu Pythona bleach.
52
53 %prep
54 %setup -q -n bleach-%{version}
55
56 %build
57 %py3_build
58
59 %if %{with tests}
60 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
61 %{__python3} -m pytest tests
62 %endif
63
64 %if %{with doc}
65 %{__make} -C docs html \
66         SPHINXBUILD=sphinx-build-3
67 %endif
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71
72 %py3_install
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
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
82
83 %if %{with doc}
84 %files apidocs
85 %defattr(644,root,root,755)
86 %doc docs/_build/html/{_modules,_static,*.html,*.js}
87 %endif
This page took 0.242029 seconds and 3 git commands to generate.