%global pypi_name MarkupSafe %global package_name %(echo "%{pypi_name}" | tr '-' '_' | tr '[:upper:]' '[:lower:]') %{?scl:%global python3_pkgversion %{nil}} %{?scl:%scl_package python-%{package_name}} %{!?scl:%global pkg_name %{name}} Name: %{?scl_prefix}python%{python3_pkgversion}-%{package_name} Version: 1.1.0 Release: 1%{?dist} Summary: Safely add untrusted strings to HTML/XML markup Group: Development/Libraries License: BSD URL: https://pypi.io/project/%{pypi_name} Source0: https://pypi.io/packages/source/%(echo "%{pypi_name}" | cut -c 1)/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: %{?scl_prefix_python}python%{python3_pkgversion}-devel BuildRequires: %{?scl_prefix_python}python%{python3_pkgversion}-setuptools %{?scl:BuildRequires: %{scl}-build %{scl}-runtime} %{?scl:Requires: %{scl}-runtime} %description MarkupSafe implements a text object that escapes characters so it is safe to use in HTML and XML. Characters that have special meanings are replaced so that they display as the actual characters. This mitigates injection attacks, meaning untrusted user input can safely be displayed on a page. %prep %setup -q -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %{?scl:scl enable %{scl} "} %{__python3} setup.py build %{?scl:"} %install %{?scl:scl enable %{scl} "} %{__python3} \ setup.py \ install \ -O1 \ --skip-build \ --root %{buildroot} \ --install-platlib %{python3_sitearch} %{?scl:"} %files %license LICENSE.rst %doc CHANGES.rst %doc README.rst %{python3_sitearch}/markupsafe %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Tue Dec 11 2018 Daniel Uvehag - 1.1.0-1 - Initial package.