From 3d9f7951d18260476ce013604ac7ba6b627eeebbe0f0616cbeb8122463fcb062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 31 Aug 2018 07:33:26 +0000 Subject: [PATCH 1/3] Accepting request 632117 from home:barendartchuk:branches:devel:languages:python - enable Python 2 binaries with update-alternatives: they are needed for running legacy plugins OBS-URL: https://build.opensuse.org/request/show/632117 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-limnoria?expand=0&rev=14 --- python-limnoria.changes | 6 +++++ python-limnoria.spec | 49 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/python-limnoria.changes b/python-limnoria.changes index 5861df0..c54e590 100644 --- a/python-limnoria.changes +++ b/python-limnoria.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 28 09:15:35 UTC 2018 - BArendartchuk@suse.com + +- enable Python 2 binaries with update-alternatives: they are + needed for running legacy plugins + ------------------------------------------------------------------- Fri Aug 17 10:26:06 UTC 2018 - tchvatal@suse.com diff --git a/python-limnoria.spec b/python-limnoria.spec index 83fa541..b863522 100644 --- a/python-limnoria.spec +++ b/python-limnoria.spec @@ -47,6 +47,8 @@ Requires: python-feedparser Requires: python-python-dateutil Requires: python-python-gnupg Requires: python-pytz +Requires(post): update-alternatives +Requires(postun): update-alternatives Provides: Supybot = %{version} Obsoletes: Supybot < 1.0 BuildArch: noarch @@ -66,8 +68,21 @@ sed -i "1,4{/\/usr\/bin\/python/d}" plugins/Debug/plugin.py %install %python_install - %python_expand %fdupes %{buildroot}%{$python_sitelib}/supybot/ +%python_clone -a %{buildroot}%{_mandir}/man1/supybot.1 +%python_clone -a %{buildroot}%{_mandir}/man1/supybot-adduser.1 +%python_clone -a %{buildroot}%{_mandir}/man1/supybot-botchk.1 +%python_clone -a %{buildroot}%{_mandir}/man1/supybot-plugin-create.1 +%python_clone -a %{buildroot}%{_mandir}/man1/supybot-plugin-doc.1 +%python_clone -a %{buildroot}%{_mandir}/man1/supybot-test.1 +%python_clone -a %{buildroot}%{_mandir}/man1/supybot-wizard.1 +%python_clone -a %{buildroot}%{_bindir}/supybot +%python_clone -a %{buildroot}%{_bindir}/supybot-adduser +%python_clone -a %{buildroot}%{_bindir}/supybot-botchk +%python_clone -a %{buildroot}%{_bindir}/supybot-plugin-create +%python_clone -a %{buildroot}%{_bindir}/supybot-plugin-doc +%python_clone -a %{buildroot}%{_bindir}/supybot-test +%python_clone -a %{buildroot}%{_bindir}/supybot-wizard %check %{python_expand export PYTHONDONTWRITEBYTECODE=1 @@ -75,12 +90,36 @@ export PYTHONPATH=%{buildroot}%{$python_sitelib}/ %python_exec test/test.py } +%post +%{python_install_alternative supybot supybot-adduser supybot-botchk + supybot-plugin-create supybot-plugin-doc + supybot-test supybot-wizard + supybot.1 + supybot-adduser.1 supybot-botchk.1 + supybot-plugin-create.1 supybot-plugin-doc.1 + supybot-test.1 supybot-wizard.1} + +%postun +%{python_uninstall_alternative supybot} + %files %{python_files} %doc README.md CONTRIBUTING.md %license LICENSE.md -%python3_only %{_bindir}/supybot -%python3_only %{_bindir}/supybot-* -%{python_sitelib}/* -%python3_only %{_mandir}/man1/supybot*%{ext_man} +%python_alternative %{_bindir}/supybot +%python_alternative %{_bindir}/supybot-adduser +%python_alternative %{_bindir}/supybot-botchk +%python_alternative %{_bindir}/supybot-plugin-create +%python_alternative %{_bindir}/supybot-plugin-doc +%python_alternative %{_bindir}/supybot-test +%python_alternative %{_bindir}/supybot-wizard +%{python_sitelib}/supybot/ +%{python_sitelib}/limnoria-*.egg-info +%python_alternative %{_mandir}/man1/supybot.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot-adduser.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot-botchk.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot-plugin-create.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot-plugin-doc.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot-test.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot-wizard.1%{ext_man} %changelog From f4c6d0510cff97b6283a7fe5a33c483973b787bd7b4c917d9b9319aadf37113c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 31 Aug 2018 07:38:01 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-limnoria?expand=0&rev=15 --- python-limnoria.spec | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/python-limnoria.spec b/python-limnoria.spec index b863522..06c799b 100644 --- a/python-limnoria.spec +++ b/python-limnoria.spec @@ -92,12 +92,10 @@ export PYTHONPATH=%{buildroot}%{$python_sitelib}/ %post %{python_install_alternative supybot supybot-adduser supybot-botchk - supybot-plugin-create supybot-plugin-doc - supybot-test supybot-wizard - supybot.1 - supybot-adduser.1 supybot-botchk.1 - supybot-plugin-create.1 supybot-plugin-doc.1 - supybot-test.1 supybot-wizard.1} + supybot-plugin-create supybot-plugin-doc supybot-test supybot-wizard + supybot.1 supybot-adduser.1 supybot-botchk.1 supybot-plugin-create.1 + supybot-plugin-doc.1 supybot-test.1 supybot-wizard.1 +} %postun %{python_uninstall_alternative supybot} @@ -114,12 +112,12 @@ export PYTHONPATH=%{buildroot}%{$python_sitelib}/ %python_alternative %{_bindir}/supybot-wizard %{python_sitelib}/supybot/ %{python_sitelib}/limnoria-*.egg-info -%python_alternative %{_mandir}/man1/supybot.1%{ext_man} -%python_alternative %{_mandir}/man1/supybot-adduser.1%{ext_man} -%python_alternative %{_mandir}/man1/supybot-botchk.1%{ext_man} -%python_alternative %{_mandir}/man1/supybot-plugin-create.1%{ext_man} -%python_alternative %{_mandir}/man1/supybot-plugin-doc.1%{ext_man} -%python_alternative %{_mandir}/man1/supybot-test.1%{ext_man} -%python_alternative %{_mandir}/man1/supybot-wizard.1%{ext_man} +%python_alternative %{_mandir}/man1/supybot.1 +%python_alternative %{_mandir}/man1/supybot-adduser.1 +%python_alternative %{_mandir}/man1/supybot-botchk.1 +%python_alternative %{_mandir}/man1/supybot-plugin-create.1 +%python_alternative %{_mandir}/man1/supybot-plugin-doc.1 +%python_alternative %{_mandir}/man1/supybot-test.1 +%python_alternative %{_mandir}/man1/supybot-wizard.1 %changelog From f72a53a16459ebfdf528c71054b4d5e86c684d5ac158e6663f8430007462987a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 31 Aug 2018 07:38:29 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-limnoria?expand=0&rev=16 --- python-limnoria.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python-limnoria.spec b/python-limnoria.spec index 06c799b..75237b0 100644 --- a/python-limnoria.spec +++ b/python-limnoria.spec @@ -47,7 +47,7 @@ Requires: python-feedparser Requires: python-python-dateutil Requires: python-python-gnupg Requires: python-pytz -Requires(post): update-alternatives +Requires(post): update-alternatives Requires(postun): update-alternatives Provides: Supybot = %{version} Obsoletes: Supybot < 1.0 @@ -91,8 +91,8 @@ export PYTHONPATH=%{buildroot}%{$python_sitelib}/ } %post -%{python_install_alternative supybot supybot-adduser supybot-botchk - supybot-plugin-create supybot-plugin-doc supybot-test supybot-wizard +%{python_install_alternative supybot supybot-adduser supybot-botchk + supybot-plugin-create supybot-plugin-doc supybot-test supybot-wizard supybot.1 supybot-adduser.1 supybot-botchk.1 supybot-plugin-create.1 supybot-plugin-doc.1 supybot-test.1 supybot-wizard.1 }