17
0

6 Commits

Author SHA256 Message Date
56196f1931 Accepting request 1330941 from devel:languages:python
- Add pythons_for_pypi macro. This macro will help to build the python
  minimal stack for different python versions.

OBS-URL: https://build.opensuse.org/request/show/1330941
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-userpath?expand=0&rev=10
2026-02-04 20:09:20 +00:00
773c92adb8 - Add pythons_for_pypi macro. This macro will help to build the python
minimal stack for different python versions.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-userpath?expand=0&rev=21
2026-02-04 11:52:54 +00:00
55acb3d380 Accepting request 1301304 from devel:languages:python
- Convert to libalternatives on SLE-16-based and newer systems

OBS-URL: https://build.opensuse.org/request/show/1301304
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-userpath?expand=0&rev=9
2025-08-25 18:39:47 +00:00
c590134e3a - Convert to libalternatives on SLE-16-based and newer systems
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-userpath?expand=0&rev=19
2025-08-25 14:27:03 +00:00
a05d75c299 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
2025-02-05 16:34:41 +00:00
82b6322053 - Use multibuild for tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-userpath?expand=0&rev=17
2025-02-05 13:20:35 +00:00
3 changed files with 55 additions and 3 deletions

3
_multibuild Normal file
View File

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

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Wed Feb 4 11:50:45 UTC 2026 - Daniel Garcia <daniel.garcia@suse.com>
- Add pythons_for_pypi macro. This macro will help to build the python
minimal stack for different python versions.
-------------------------------------------------------------------
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>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-userpath # spec file for package python-userpath
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2026 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,22 @@
# #
%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
%{?pythons_for_pypi}
%{?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 +44,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 +69,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