- break python-invocations, invoke cycle on tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invoke?expand=0&rev=43
This commit is contained in:
Dirk Mueller 2023-05-16 14:16:46 +00:00 committed by Git OBS Bridge
parent 364c86cd1a
commit 20e366a542
3 changed files with 23 additions and 4 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 16 14:16:29 UTC 2023 - Dirk Müller <dmueller@suse.com>
- break python-invocations, invoke cycle on tests
-------------------------------------------------------------------
Sun May 14 12:38:22 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -1,5 +1,5 @@
#
# spec file for package python-invoke
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
@ -16,11 +16,17 @@
#
# broken with pytest-relaxed (same author -- all of this is unmaintained)
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-invoke
Name: python-invoke%{psuffix}
Version: 2.1.1
Release: 0
Summary: Pythonic Task Execution
@ -31,7 +37,6 @@ Source: https://files.pythonhosted.org/packages/source/i/invoke/invoke-%
# PATCH-FIX-OPENSUSE remove-icecream.patch mcepl@suse.com
# We dont need icecream as yet another complication.
Patch0: remove-icecream.patch
BuildRequires: %{python_module invocations >= 3.0.1}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools > 56}
BuildRequires: %{python_module wheel}
@ -46,6 +51,8 @@ BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module fluidity-sm}
BuildRequires: %{python_module invocations >= 3.0.1}
BuildRequires: %{python_module invoke >= %version}
BuildRequires: %{python_module lexicon}
BuildRequires: %{python_module pytest-relaxed}
BuildRequires: %{python_module pytest}
@ -66,11 +73,13 @@ rm -fr invoke/vendor/*
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/inv
%python_clone -a %{buildroot}%{_bindir}/invoke
%endif
%if %{with test}
%check
@ -93,6 +102,7 @@ skiptests+=" or may_be_overridden_when_pty_True or uses_execve_for_pty_True or s
%postun
%python_uninstall_alternative inv
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.rst
@ -100,5 +110,6 @@ skiptests+=" or may_be_overridden_when_pty_True or uses_execve_for_pty_True or s
%python_alternative %{_bindir}/invoke
%{python_sitelib}/invoke
%{python_sitelib}/invoke-%{version}*-info
%endif
%changelog