14
0

Accepting request 632453 from 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/632453
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-limnoria?expand=0&rev=5
This commit is contained in:
2018-09-03 08:34:22 +00:00
committed by Git OBS Bridge
2 changed files with 48 additions and 5 deletions

View File

@@ -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

View File

@@ -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,34 @@ 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
%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