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