forked from pool/python-userpath
Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 55acb3d380 | |||
| c590134e3a | |||
| a05d75c299 | |||
| 82b6322053 |
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
||||||
@@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 25 14:26:40 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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 and contributors
|
||||||
#
|
#
|
||||||
# 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,21 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%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
|
||||||
@@ -30,12 +43,20 @@ BuildRequires: %{python_module wheel}
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-click
|
Requires: python-click
|
||||||
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
%endif
|
||||||
|
%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,28 +68,39 @@ 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
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative userpath
|
%python_uninstall_alternative userpath
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative userpath
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%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
|
||||||
|
|||||||
Reference in New Issue
Block a user