Bump to 2.1.3
[platform/upstream/python3-MarkupSafe.git] / packaging / python3-MarkupSafe.spec
1 Name:           python3-MarkupSafe
2 Version:        2.1.3
3 Release:        0
4 Summary:        Implements a XML/HTML/XHTML Markup safe string for Python
5 License:        BSD-3-Clause
6 Group:          Development/Languages/Python
7 Url:            https://palletsprojects.com/p/markupsafe/
8 Source:         %{name}-%{version}.tar.gz
9 Source1001:     %{name}.manifest
10
11 BuildRequires:  python3-devel
12 BuildRequires:  python3-setuptools
13
14 Provides:       python3-markupsafe = %{version}
15 Obsoletes:      python3-markupsafe < %{version}
16
17 %description
18 Implements a unicode subclass that supports HTML strings. This can be used to
19 safely encode strings for dynamically generated web pages.
20
21 %prep
22 %setup -q -n %{name}-%{version}
23
24 %build
25 cp %{SOURCE1001} .
26 export CFLAGS="%{optflags}"
27 %{_bindir}/python3 setup.py build
28
29 %install
30 %{_bindir}/python3 setup.py install --prefix=%{_prefix} --install-lib=%{python3_sitelib} --root=%{buildroot}
31
32 # Move library
33 %ifarch x86_64 aarch64
34 mkdir -p %{buildroot}%{_libdir}/python%{python3_version}/site-packages/markupsafe
35 mv %{buildroot}%{python3_sitelib}/markupsafe/_speedups*.so %{buildroot}%{_libdir}/python%{python3_version}/site-packages/markupsafe
36 %endif
37
38 %remove_docs
39
40 %files
41 %manifest %{name}.manifest
42 %license LICENSE.rst
43 %{python3_sitelib}/markupsafe/
44 %{python3_sitelib}/MarkupSafe-%{version}-py*.egg-info
45 %{_libdir}/python%{python3_version}/site-packages/markupsafe/