From 53f37154be6394e2409f033207ffd432a546d4bc17506287aa2080ce75931a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 19 May 2020 12:14:13 +0000 Subject: [PATCH] Accepting request 807244 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807244 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-semver?expand=0&rev=23 --- python-semver.changes | 5 +++++ python-semver.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-semver.changes b/python-semver.changes index 6f13b2b..49ad5ec 100644 --- a/python-semver.changes +++ b/python-semver.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 19 09:27:55 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sat May 9 16:05:49 UTC 2020 - Arun Persaud diff --git a/python-semver.spec b/python-semver.spec index 18a7269..025c444 100644 --- a/python-semver.spec +++ b/python-semver.spec @@ -31,6 +31,8 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives # See https://github.com/k-bx/python-semver/issues/67 for why conflicts is needed Conflicts: python-node-semver BuildArch: noarch @@ -48,16 +50,23 @@ See also http://semver.org/ %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pysemver %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative pysemver + +%postun +%python_uninstall_alternative pysemver + %files %{python_files} %doc README.rst %{python_sitelib}/semver* %pycache_only %{python_sitelib}/__pycache__/semver* -%python3_only %{_bindir}/pysemver +%python_alternative %{_bindir}/pysemver %changelog