14
0

Accepting request 726519 from home:mcalabkova:branches:devel:languages:python

- update to version 1.1
  * Python 3 only
  * Use HTTPS when possible
  * Fix URLs and shebangs
  * Fix a dash being misinterpreted

OBS-URL: https://build.opensuse.org/request/show/726519
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymetar?expand=0&rev=8
This commit is contained in:
2019-08-27 15:44:39 +00:00
committed by Git OBS Bridge
parent 1bf0bd5108
commit 872cb9bbd3
4 changed files with 37 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pymetar
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
@@ -13,29 +13,30 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define modname pymetar
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-%{modname}
Version: 0.20
Version: 1.1
Release: 0
Summary: METAR weather report parser
License: GPL-2.0+
License: GPL-2.0-or-later
Group: Development/Languages/Python
Url: http://www.schwarzvogel.de/software-pymetar.shtml
URL: http://www.schwarzvogel.de/software-pymetar.shtml
Source0: http://www.schwarzvogel.de/pkgs/pymetar-%{version}.tar.gz
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%python_subpackages
%description
This library downloads the weather report for a given station ID, decodes
@@ -45,16 +46,24 @@ it and provides easy access to all the data found in the report.
%setup -q -n %{modname}-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files
%defattr(-,root,root)
%check
cd testing/smoketest/
tar -xf reports.tgz
mkdir logs
./runtests.sh
cd -
%files %python_files
%doc README.md
%license COPYING
%{_bindir}/%{modname}
%{python_sitelib}/%{modname}.*
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/*
%{_datadir}/doc/%{modname}-%{version}/
%{_mandir}/man1/%{modname}.1%{?ext_man}