From 0d6c0460c1f808d4ca00f305e4c728357d7253162914cf5ba1ff3b030ff3cc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 12 Sep 2019 18:10:42 +0000 Subject: [PATCH] - Fix obsoletion and migration from version 0.20 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymetar?expand=0&rev=9 --- python-pymetar.changes | 5 +++++ python-pymetar.spec | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/python-pymetar.changes b/python-pymetar.changes index d289ec6..8ba9e88 100644 --- a/python-pymetar.changes +++ b/python-pymetar.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 12 18:10:26 UTC 2019 - Tomáš Chvátal + +- Fix obsoletion and migration from version 0.20 + ------------------------------------------------------------------- Wed Jun 19 14:14:29 UTC 2019 - Marketa Calabkova diff --git a/python-pymetar.spec b/python-pymetar.spec index c1e5f34..e863844 100644 --- a/python-pymetar.spec +++ b/python-pymetar.spec @@ -18,6 +18,7 @@ %define modname pymetar +%define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-%{modname} @@ -26,16 +27,13 @@ Release: 0 Summary: METAR weather report parser License: GPL-2.0-or-later Group: Development/Languages/Python -URL: http://www.schwarzvogel.de/software-pymetar.shtml +URL: https://www.schwarzvogel.de/software-pymetar.shtml Source0: http://www.schwarzvogel.de/pkgs/pymetar-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -%if 0%{?suse_version} -%if 0%{?suse_version} > 1110 +Obsoletes: %{oldpython}-%{modname} BuildArch: noarch -%endif -%endif %python_subpackages %description @@ -50,6 +48,8 @@ it and provides easy access to all the data found in the report. %install %python_install +# we install docs on our own +rm -r %{buildroot}%{_datadir}/doc/ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -59,12 +59,11 @@ mkdir logs ./runtests.sh cd - -%files %python_files +%files %{python_files} %doc README.md %license COPYING -%{_bindir}/%{modname} +%python3_only %{_bindir}/%{modname} %{python_sitelib}/* -%{_datadir}/doc/%{modname}-%{version}/ -%{_mandir}/man1/%{modname}.1%{?ext_man} +%python3_only %{_mandir}/man1/%{modname}.1%{?ext_man} %changelog