From 62f99a9dcb11a4a69ddb28d541ec712c148e93fb289941d50449b680d5232ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 8 Jul 2025 08:27:41 +0000 Subject: [PATCH 1/2] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=41 --- python-cx_Freeze.changes | 5 +++++ python-cx_Freeze.spec | 19 ++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/python-cx_Freeze.changes b/python-cx_Freeze.changes index f09e131..1914db5 100644 --- a/python-cx_Freeze.changes +++ b/python-cx_Freeze.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 8 08:26:51 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Apr 3 01:23:28 UTC 2025 - Steve Kowalik diff --git a/python-cx_Freeze.spec b/python-cx_Freeze.spec index 60c88ea..1bfc27a 100644 --- a/python-cx_Freeze.spec +++ b/python-cx_Freeze.spec @@ -17,6 +17,7 @@ %define oldpython python +%bcond_without libalternatives Name: python-cx_Freeze Version: 8.0.0 Release: 0 @@ -38,21 +39,21 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= 65} BuildRequires: %{python_module tomli >= 2.0.1 if %python-base < 3.11} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: chrpath BuildRequires: fdupes BuildRequires: patchelf BuildRequires: python-rpm-macros +Requires: alts Requires: patchelf Requires: python-filelock >= 3.12 Requires: python-packaging >= 24 Requires: python-setuptools >= 65 +# we provide same binary like the deprecated py2 variant +Conflicts: %{oldpython}-cx_Freeze %if 0%{python_version_nodots} < 311 Requires: python-tomli >= 2.0.1 %endif -Requires(post): update-alternatives -Requires(postun): update-alternatives -# we provide same binary like the deprecated py2 variant -Conflicts: %{oldpython}-cx_Freeze %python_subpackages %description @@ -87,13 +88,9 @@ export CFLAGS="%{optflags}" # bdist_rpm is not long for this world, and it always execs the default Python %pytest_arch -k 'not (test_command_bdist_rpm or test_command_build_exe or test_command_build or test_bdist_appimage)' -%post -%python_install_alternative cxfreeze-quickstart -%python_install_alternative cxfreeze - -%postun -%python_uninstall_alternative cxfreeze-quickstart -%python_uninstall_alternative cxfreeze +%pre +%python_libalternatives_reset_alternative cxfreeze-quickstart +%python_libalternatives_reset_alternative cxfreeze %files %{python_files} %doc README.md From e8a3528d8425b30ab0d1ac5230a474d2d9058f12cad2f74ebd1e8cad17ef9533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 2 Sep 2025 15:40:04 +0000 Subject: [PATCH 2/2] skip the failing test OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=42 --- python-cx_Freeze.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python-cx_Freeze.spec b/python-cx_Freeze.spec index 1bfc27a..b6084a7 100644 --- a/python-cx_Freeze.spec +++ b/python-cx_Freeze.spec @@ -1,7 +1,7 @@ # # spec file for package python-cx_Freeze # -# 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 @@ -86,7 +86,8 @@ export CFLAGS="%{optflags}" %check # bdist_rpm is not long for this world, and it always execs the default Python -%pytest_arch -k 'not (test_command_bdist_rpm or test_command_build_exe or test_command_build or test_bdist_appimage)' +# test_bdist_deb_simple_pyproject runs the binary, which is currently complicated with libalternatives: https://github.com/openSUSE/python-rpm-macros/pull/196 +%pytest_arch -k 'not (test_command_bdist_rpm or test_command_build_exe or test_command_build or test_bdist_appimage or test_bdist_deb_simple_pyproject)' %pre %python_libalternatives_reset_alternative cxfreeze-quickstart