From 3f7db2a7ef2e708ddeb44eae8c094850f591fa13bef09742e5692753085467b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:38:34 +0000 Subject: [PATCH] Accepting request 807626 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807626 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pypiserver?expand=0&rev=6 --- python-pypiserver.changes | 5 +++++ python-pypiserver.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pypiserver.changes b/python-pypiserver.changes index 30697a8..b7197ad 100644 --- a/python-pypiserver.changes +++ b/python-pypiserver.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:39 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Mar 23 13:11:12 UTC 2020 - pgajdos@suse.com diff --git a/python-pypiserver.spec b/python-pypiserver.spec index 1823b43..3c78a44 100644 --- a/python-pypiserver.spec +++ b/python-pypiserver.spec @@ -39,6 +39,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-passlib >= 1.6 Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %if %{with python2} BuildRequires: python-mock @@ -58,6 +60,7 @@ rm -f pytest.ini %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pypi-server %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -66,10 +69,16 @@ rm -f pytest.ini # (see centodeps-setup.py) %pytest tests -k "not (test_pipInstall_openOk or test_pipInstall_authedOk or test_hash_algos)" +%post +%python_install_alternative pypi-server + +%postun +%python_uninstall_alternative pypi-server + %files %{python_files} %doc README.rst %license LICENSE.txt %{python_sitelib}/* -%python3_only %{_bindir}/pypi-server +%python_alternative %{_bindir}/pypi-server %changelog