From 1524be55083d643ea38901355b466a3ad31f213eb87dae2d1cdd3d360f397e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 8 Apr 2020 12:04:38 +0000 Subject: [PATCH 1/3] - Drop require on doc package to pull python2 package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bottle?expand=0&rev=31 --- python-bottle.changes | 5 +++++ python-bottle.spec | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/python-bottle.changes b/python-bottle.changes index b081677..2b9fd6a 100644 --- a/python-bottle.changes +++ b/python-bottle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 8 12:04:22 UTC 2020 - Tomáš Chvátal + +- Drop require on doc package to pull python2 package + ------------------------------------------------------------------- Sun Dec 8 16:56:51 UTC 2019 - Benoît Monin diff --git a/python-bottle.spec b/python-bottle.spec index be9e39b..650d451 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -1,7 +1,7 @@ # # spec file for package python-bottle # -# Copyright (c) 2019 SUSE LLC +# 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 @@ -22,7 +22,6 @@ Version: 0.12.18 Release: 0 Summary: WSGI framework for small web applications License: MIT -Group: Development/Languages/Python URL: https://bottlepy.org/ Source: https://files.pythonhosted.org/packages/source/b/bottle/bottle-%{version}.tar.gz Source1: http://bottlepy.org/docs/0.12/bottle-docs.pdf @@ -41,8 +40,6 @@ no dependencies other than the Python Standard Library. %package -n %{name}-doc Summary: Documentation for %{name} -Group: Documentation/Other -Requires: %{name} = %{version} Provides: %{python_module bottle-doc = %{version}} %description -n %{name}-doc From a542da9f585df98850d5b4945b432b28a83e21d7ad56098bdf532d5434a2c610 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Apr 2020 11:58:50 +0000 Subject: [PATCH 2/3] - Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bottle?expand=0&rev=32 --- python-bottle.changes | 5 +++++ python-bottle.spec | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/python-bottle.changes b/python-bottle.changes index 2b9fd6a..b33eef0 100644 --- a/python-bottle.changes +++ b/python-bottle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 14 11:52:22 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Wed Apr 8 12:04:22 UTC 2020 - Tomáš Chvátal diff --git a/python-bottle.spec b/python-bottle.spec index 650d451..e1fd98d 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -41,6 +41,8 @@ no dependencies other than the Python Standard Library. %package -n %{name}-doc Summary: Documentation for %{name} Provides: %{python_module bottle-doc = %{version}} +Requires(post): update-alternatives +Requires(postun): update-alternatives %description -n %{name}-doc Bottle is a micro-framework for small web applications. It offers @@ -63,13 +65,18 @@ chmod -x bottle.egg-info/* %install %python_install -%python_clone %{buildroot}%{_bindir}/bottle.py +%python_clone -a %{buildroot}%{_bindir}/bottle.py + +%post +%python_install_alternative bottle.py + +%postun +%python_uninstall_alternative bottle.py %files %{python_files} %license LICENSE %doc README.rst -%{_bindir}/bottle.py-%{python_bin_suffix} -%python3_only %{_bindir}/bottle.py +%python_alternative %{_bindir}/bottle.py %{python_sitelib}/bottle.py* %pycache_only %{python_sitelib}/__pycache__ %{python_sitelib}/bottle-%{version}-py%{python_version}.egg-info From 0043eedc3cfcbb4908a5e0ccb5fd535b9fc96323617e9ceacb08a88bbf580604 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Apr 2020 12:17:20 +0000 Subject: [PATCH 3/3] Fix BRs OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bottle?expand=0&rev=33 --- python-bottle.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-bottle.spec b/python-bottle.spec index e1fd98d..aece78b 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -29,6 +29,8 @@ Source2: https://raw.githubusercontent.com/bottlepy/bottle/release-0.12/L BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros BuildArch: noarch +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -41,8 +43,6 @@ no dependencies other than the Python Standard Library. %package -n %{name}-doc Summary: Documentation for %{name} Provides: %{python_module bottle-doc = %{version}} -Requires(post): update-alternatives -Requires(postun): update-alternatives %description -n %{name}-doc Bottle is a micro-framework for small web applications. It offers