]>
Commit | Line | Data |
---|---|---|
d1b3c515 ER |
1 | # |
2 | # Conditional build: | |
f17806b5 | 3 | %bcond_without doc # Sphinx documentation |
37cbba9f | 4 | %bcond_without tests # unit tests |
d1b3c515 | 5 | |
a8646d2c | 6 | %define module markupsafe |
102e358b ER |
7 | Summary: Implements a XML/HTML/XHTML Markup safe string for Python 3 |
8 | Summary(pl.UTF-8): MarkupSafe - łańcuch dla Pythona 3 bezpieczny pod kątem znaczników XML/HTML/XHTML | |
9 | Name: python3-%{module} | |
b20ff1a4 JB |
10 | Version: 2.1.1 |
11 | Release: 1 | |
a79f2bec | 12 | License: BSD |
13 | Group: Development/Languages/Python | |
f17806b5 | 14 | #Source0Download: https://pypi.org/simple/markupsafe/ |
4cbda2d2 | 15 | Source0: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz |
b20ff1a4 | 16 | # Source0-md5: 9809f9fdd98bc835b0c21aa8f79cbf30 |
69f29ca0 | 17 | URL: https://markupsafe.palletsprojects.com/ |
b20ff1a4 | 18 | BuildRequires: python3-devel >= 1:3.7 |
b15ed0c4 | 19 | BuildRequires: python3-setuptools |
69f29ca0 ER |
20 | BuildRequires: rpm-pythonprov |
21 | BuildRequires: rpmbuild(macros) >= 1.714 | |
f17806b5 JB |
22 | %if %{with tests} |
23 | BuildRequires: python3-pytest | |
24 | %endif | |
f17806b5 JB |
25 | %if %{with doc} |
26 | BuildRequires: python3-pallets-sphinx-themes >= 1.1.0 | |
e75ffe80 JB |
27 | BuildRequires: python3-sphinx_issues >= 1.2.0 |
28 | BuildRequires: python3-sphinxcontrib-log-cabinet >= 1.0.1 | |
29 | BuildRequires: sphinx-pdg-3 >= 1.8.0 | |
f17806b5 | 30 | %endif |
b20ff1a4 | 31 | Requires: python3-modules >= 1:3.7 |
a79f2bec | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
02f65cc7 JB |
35 | MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python. |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego | |
39 | pod kątem znaczników XML/HTML/XHTML. | |
a79f2bec | 40 | |
f17806b5 JB |
41 | %package apidocs |
42 | Summary: API documentation for Python MarkupSafe module | |
43 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona MarkupSafe | |
44 | Group: Documentation | |
45 | ||
46 | %description apidocs | |
47 | API documentation for Python MarkupSafe module. | |
48 | ||
49 | %description apidocs -l pl.UTF-8 | |
50 | Dokumentacja API modułu Pythona MarkupSafe. | |
51 | ||
a79f2bec | 52 | %prep |
4cbda2d2 | 53 | %setup -q -n MarkupSafe-%{version} |
a79f2bec | 54 | |
55 | %build | |
f17806b5 JB |
56 | %py3_build |
57 | ||
58 | %if %{with tests} | |
b20ff1a4 | 59 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ |
f17806b5 JB |
60 | PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \ |
61 | %{__python3} -m pytest tests | |
62 | %endif | |
f17806b5 JB |
63 | |
64 | %if %{with doc} | |
65 | %{__make} -C docs html \ | |
66 | SPHINXBUILD=sphinx-build-3 | |
d1b3c515 | 67 | %endif |
a79f2bec | 68 | |
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
b20ff1a4 | 71 | |
e2092c77 | 72 | %py3_install |
d1b3c515 | 73 | |
d1b3c515 | 74 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c |
a79f2bec | 75 | |
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
f17806b5 | 81 | %doc CHANGES.rst LICENSE.rst README.rst |
d1b3c515 ER |
82 | %dir %{py3_sitedir}/markupsafe |
83 | %{py3_sitedir}/markupsafe/*.py | |
84 | %{py3_sitedir}/markupsafe/__pycache__ | |
69f29ca0 ER |
85 | %{py3_sitedir}/markupsafe/_speedups.pyi |
86 | %{py3_sitedir}/markupsafe/py.typed | |
02f65cc7 | 87 | %attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so |
d1b3c515 | 88 | %{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info |
f17806b5 JB |
89 | |
90 | %if %{with doc} | |
91 | %files apidocs | |
92 | %defattr(644,root,root,755) | |
93 | %doc docs/_build/html/{_static,*.html,*.js} | |
94 | %endif |