2011-09-01 15:34:27 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-MarkupSafe
|
|
|
|
#
|
2024-01-26 22:18:48 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2011-09-01 15:34:27 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-09-01 17:51:21 +02:00
|
|
|
|
2019-01-14 16:25:17 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-01 15:34:27 +02:00
|
|
|
#
|
|
|
|
|
2011-09-01 17:51:21 +02:00
|
|
|
|
2022-03-27 22:04:17 +02:00
|
|
|
%bcond_without test
|
2023-04-21 17:05:02 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2011-09-01 15:34:27 +02:00
|
|
|
Name: python-MarkupSafe
|
2024-02-04 11:45:45 +01:00
|
|
|
Version: 2.1.5
|
2013-06-17 14:51:56 +02:00
|
|
|
Release: 0
|
2011-09-01 15:34:27 +02:00
|
|
|
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
2022-03-27 22:04:17 +02:00
|
|
|
URL: https://github.com/pallets/markupsafe
|
2017-04-04 17:22:44 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
|
2017-03-22 14:30:16 +01:00
|
|
|
BuildRequires: %{python_module devel}
|
2023-06-19 22:14:59 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2019-03-05 17:47:33 +01:00
|
|
|
BuildRequires: fdupes
|
2017-03-22 16:12:33 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-06-09 23:23:00 +02:00
|
|
|
Requires: python-base >= 3.6
|
2022-03-27 22:04:17 +02:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
%endif
|
2017-03-22 14:30:16 +01:00
|
|
|
%python_subpackages
|
2011-09-01 15:34:27 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Implements a unicode subclass that supports HTML strings. This can be used to
|
2011-09-09 09:15:08 +02:00
|
|
|
safely encode strings for dynamically generated web pages.
|
2011-09-01 15:34:27 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n MarkupSafe-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-03-22 14:30:16 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
2023-06-19 22:14:59 +02:00
|
|
|
%pyproject_wheel
|
2011-09-01 15:34:27 +02:00
|
|
|
|
|
|
|
%install
|
2023-06-19 22:14:59 +02:00
|
|
|
%pyproject_install
|
2019-03-05 17:47:33 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2017-04-04 17:22:44 +02:00
|
|
|
%python_expand rm %{buildroot}%{$python_sitearch}/markupsafe/_speedups.c
|
2022-06-27 09:52:22 +02:00
|
|
|
# Upstream changed the Python package metadata to require Python 3.7, but the tests pass on Python 3.6.
|
|
|
|
%if %python_version_nodots == 36
|
|
|
|
%python_expand sed 's/Requires-Python: >=3.7/Requires-Python: >=3.6/' -i %{buildroot}%{python_sitearch}/MarkupSafe-%{version}-py3.6.egg-info/PKG-INFO
|
|
|
|
%endif
|
2011-09-01 15:34:27 +02:00
|
|
|
|
2021-04-16 09:30:13 +02:00
|
|
|
%if %{with test}
|
2011-09-01 15:34:27 +02:00
|
|
|
%check
|
2022-03-27 22:04:17 +02:00
|
|
|
%pytest_arch
|
2021-04-16 09:30:13 +02:00
|
|
|
%endif
|
2011-09-01 15:34:27 +02:00
|
|
|
|
2019-02-21 23:46:07 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE.rst
|
|
|
|
%doc README.rst docs/
|
2012-05-23 09:13:09 +02:00
|
|
|
%{python_sitearch}/markupsafe/
|
2023-06-19 22:14:59 +02:00
|
|
|
%{python_sitearch}/MarkupSafe-%{version}.dist-info
|
2011-09-01 15:34:27 +02:00
|
|
|
|
|
|
|
%changelog
|