Accepting request 1247287 from devel:languages:python
- split test dependencies into a multibuild to break cycle with pytest OBS-URL: https://build.opensuse.org/request/show/1247287 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-MarkupSafe?expand=0&rev=32
This commit is contained in:
commit
4c155ad785
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 20 08:14:24 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- split test dependencies into a multibuild to break cycle
|
||||||
|
with pytest
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 4 23:21:41 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
Wed Dec 4 23:21:41 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-MarkupSafe
|
# spec file for package python-MarkupSafe
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,9 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -%{flavor}
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-MarkupSafe
|
Name: python-MarkupSafe%{psuffix}
|
||||||
Version: 2.1.5
|
Version: 2.1.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
|
Summary: Implements a XML/HTML/XHTML Markup safe string for Python
|
||||||
@ -28,11 +35,13 @@ URL: https://github.com/pallets/markupsafe
|
|||||||
Source: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-base >= 3.6
|
Requires: python-base >= 3.6
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module MarkupSafe >= %{version}}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
%endif
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@ -48,23 +57,29 @@ safely encode strings for dynamically generated web pages.
|
|||||||
sed -i -e '/^python_requires =/s/3\.7/3\.6/' setup.cfg
|
sed -i -e '/^python_requires =/s/3\.7/3\.6/' setup.cfg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if !%{with test}
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
%python_expand rm %{buildroot}%{$python_sitearch}/markupsafe/_speedups.c
|
%python_expand rm %{buildroot}%{$python_sitearch}/markupsafe/_speedups.c
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
%pytest_arch
|
%pytest_arch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.rst
|
%license LICENSE.rst
|
||||||
%doc README.rst docs/
|
%doc README.rst docs/
|
||||||
%{python_sitearch}/markupsafe/
|
%{python_sitearch}/markupsafe/
|
||||||
%{python_sitearch}/MarkupSafe-%{version}.dist-info
|
%{python_sitearch}/MarkupSafe-%{version}.dist-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user