Accepting request 1243367 from devel:languages:python
- Use multibuild for tests OBS-URL: https://build.opensuse.org/request/show/1243367 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-userpath?expand=0&rev=8
This commit is contained in:
commit
a05d75c299
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 5 12:20:58 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Use multibuild for tests
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Mar 16 14:23:15 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Sat Mar 16 14:23:15 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-userpath
|
# spec file for package python-userpath
|
||||||
#
|
#
|
||||||
# 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,8 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%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}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-userpath
|
Name: python-userpath%{psuffix}
|
||||||
Version: 1.9.2
|
Version: 1.9.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Tool for adding locations to the user PATH
|
Summary: Tool for adding locations to the user PATH
|
||||||
@ -33,9 +41,12 @@ Requires: python-click
|
|||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with test}
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module click}
|
BuildRequires: %{python_module click}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module userpath = %{version}}
|
||||||
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -47,17 +58,24 @@ with no elevated privileges required.
|
|||||||
%autosetup -p1 -n userpath-%{version}
|
%autosetup -p1 -n userpath-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if !%{with test}
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/userpath
|
%python_clone -a %{buildroot}%{_bindir}/userpath
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
%pytest
|
%pytest
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%post
|
%post
|
||||||
%python_install_alternative userpath
|
%python_install_alternative userpath
|
||||||
|
|
||||||
@ -70,5 +88,6 @@ export LC_ALL=C.UTF-8
|
|||||||
%python_alternative %{_bindir}/userpath
|
%python_alternative %{_bindir}/userpath
|
||||||
%{python_sitelib}/userpath
|
%{python_sitelib}/userpath
|
||||||
%{python_sitelib}/userpath-%{version}*-info
|
%{python_sitelib}/userpath-%{version}*-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user