diff --git a/python-twine.changes b/python-twine.changes index e763f72..7a9aaa6 100644 --- a/python-twine.changes +++ b/python-twine.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 25 14:24:32 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Sat Jan 25 21:08:56 UTC 2025 - Matej Cepl diff --git a/python-twine.spec b/python-twine.spec index f26d58c..77a625a 100644 --- a/python-twine.spec +++ b/python-twine.spec @@ -1,7 +1,7 @@ # # spec file for package python-twine # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-twine Version: 6.1.0 @@ -60,9 +65,14 @@ Requires: python-requests-toolbelt >= 0.8.0 Requires: python-rfc3986 >= 1.4.0 Requires: python-rich >= 12.0.0 Requires: python-urllib3 >= 1.26 +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif %python_subpackages %description @@ -97,6 +107,9 @@ rm tests/test_integration.py %postun %python_uninstall_alternative twine +%pre +%python_libalternatives_reset_alternative twine + %files %{python_files} %doc AUTHORS README.rst %license LICENSE