From 26e629fdea562ba75756cc45746f48fea177fc6dfdce6e467fdff50c67bd6711 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 19 Sep 2021 17:10:21 +0000 Subject: [PATCH] Accepting request 920164 from devel:languages:python revert OBS-URL: https://build.opensuse.org/request/show/920164 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pecan?expand=0&rev=57 --- python-pecan.changes | 5 ----- python-pecan.spec | 46 ++------------------------------------------ 2 files changed, 2 insertions(+), 49 deletions(-) diff --git a/python-pecan.changes b/python-pecan.changes index a3cccf7..485878f 100644 --- a/python-pecan.changes +++ b/python-pecan.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Sun Aug 22 19:58:35 UTC 2021 - Stefan Schubert - -- Use libalternatives instead of update-alternatives. - ------------------------------------------------------------------- Thu May 27 06:49:51 UTC 2021 - pgajdos@suse.com diff --git a/python-pecan.spec b/python-pecan.spec index 75d17ed..02575de 100644 --- a/python-pecan.spec +++ b/python-pecan.spec @@ -16,12 +16,6 @@ # -%if 0%{?suse_version} > 1500 -%bcond_without libalternatives -%else -%bcond_with libalternatives -%endif - %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pecan @@ -57,12 +51,8 @@ Requires: python-WebTest >= 1.3.1 Requires: python-logutils >= 0.3 Requires: python-setuptools Requires: python-six -%if %{with libalternatives} -Requires: alts -%else Requires(post): update-alternatives Requires(postun):update-alternatives -%endif BuildArch: noarch %if 0%{?suse_version} Suggests: python-Genshi @@ -88,31 +78,12 @@ sed -ie "/^pep8$/d" test-requirements.txt %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if ! %{with libalternatives} - %python_clone -a %{buildroot}%{_bindir}/pecan - %python_clone -a %{buildroot}%{_bindir}/gunicorn_pecan -%else - %python_clone %{buildroot}%{_bindir}/pecan - %python_clone %{buildroot}%{_bindir}/gunicorn_pecan - ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/pecan - mkdir -p %{buildroot}%{_datadir}/libalternatives/pecan - %python_expand echo "binary=%{_bindir}/pecan-%{$python_version}" > %{buildroot}%{_datadir}/libalternatives/pecan/10%{$python_version_nodots}.conf - ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/gunicorn_pecan - mkdir -p %{buildroot}%{_datadir}/libalternatives/gunicorn_pecan - %python_expand echo "binary=%{_bindir}/gunicorn_pecan-%{$python_version}" > %{buildroot}%{_datadir}/libalternatives/gunicorn_pecan/10%{$python_version_nodots}.conf -%endif +%python_clone -a %{buildroot}%{_bindir}/pecan +%python_clone -a %{buildroot}%{_bindir}/gunicorn_pecan %check %pyunittest discover -v -%if %{with libalternatives} -%pre -# removing old update-alternatives entries -if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then - %python_uninstall_alternative pecan - %python_uninstall_alternative gunicorn_pecan -fi -%else %post %python_install_alternative pecan %python_install_alternative gunicorn_pecan @@ -120,25 +91,12 @@ fi %postun %python_uninstall_alternative pecan %python_uninstall_alternative gunicorn_pecan -%endif %files %{python_files} %license LICENSE %doc README.rst -%if ! 0%{with libalternatives} %python_alternative %{_bindir}/pecan %python_alternative %{_bindir}/gunicorn_pecan -%else -%dir %{_datadir}/libalternatives -%dir %{_datadir}/libalternatives/pecan -%{_datadir}/libalternatives/pecan/10%python_version_nodots.conf -%{_bindir}/pecan -%{_bindir}/pecan-%python_version -%dir %{_datadir}/libalternatives/gunicorn_pecan -%{_datadir}/libalternatives/gunicorn_pecan/10%python_version_nodots.conf -%{_bindir}/gunicorn_pecan -%{_bindir}/gunicorn_pecan-%python_version -%endif %{python_sitelib}/* %changelog