From 0f23fdae5af3d9d5650f14994ce650c2557ecaefe95d3eed9bbe64b345074115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 27 May 2020 14:46:06 +0000 Subject: [PATCH] Accepting request 809590 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809590 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cx_Freeze?expand=0&rev=9 --- python-cx_Freeze.changes | 5 +++++ python-cx_Freeze.spec | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/python-cx_Freeze.changes b/python-cx_Freeze.changes index fe89bcd..5de4ecd 100644 --- a/python-cx_Freeze.changes +++ b/python-cx_Freeze.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:53 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Sep 13 14:55:04 UTC 2019 - Tomáš Chvátal diff --git a/python-cx_Freeze.spec b/python-cx_Freeze.spec index c295e5d..629fb32 100644 --- a/python-cx_Freeze.spec +++ b/python-cx_Freeze.spec @@ -1,7 +1,7 @@ # # spec file for package python-cx_Freeze # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -37,6 +37,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: chrpath BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives # we provide same binary like the deprecated py2 variant Conflicts: %{oldpython}-cx_Freeze %python_subpackages @@ -63,6 +65,8 @@ export CFLAGS="%{optflags}" %install %python_install +%python_clone -a %{buildroot}%{_bindir}/cxfreeze-quickstart +%python_clone -a %{buildroot}%{_bindir}/cxfreeze %python_expand chrpath -d %{buildroot}%{$python_sitearch}/cx_Freeze/bases/Console* %python_expand %fdupes %{buildroot}%{$python_sitearch} @@ -70,11 +74,19 @@ export CFLAGS="%{optflags}" # test_FindModule_from_zip - needs testpkg1.egg which is not present %pytest_arch -k 'not test_FindModule_from_zip' +%post +%python_install_alternative cxfreeze-quickstart +%python_install_alternative cxfreeze + +%postun +%python_uninstall_alternative cxfreeze-quickstart +%python_uninstall_alternative cxfreeze + %files %{python_files} %doc README.md %license doc/src/license.rst -%python3_only %{_bindir}/cxfreeze -%python3_only %{_bindir}/cxfreeze-quickstart +%python_alternative %{_bindir}/cxfreeze +%python_alternative %{_bindir}/cxfreeze-quickstart %{python_sitearch}/* %changelog