From 0818bf55b27738f2f99738ecb5605994ce6f4b4a Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Mon, 22 Jun 2020 15:50:54 -0500 Subject: [PATCH] weather: update to 2.4. --- srcpkgs/weather/patches/10-py3-decode.patch | 75 -------------------- srcpkgs/weather/patches/20-faq-headers.patch | 51 ------------- srcpkgs/weather/template | 10 ++- 3 files changed, 4 insertions(+), 132 deletions(-) delete mode 100644 srcpkgs/weather/patches/10-py3-decode.patch delete mode 100644 srcpkgs/weather/patches/20-faq-headers.patch diff --git a/srcpkgs/weather/patches/10-py3-decode.patch b/srcpkgs/weather/patches/10-py3-decode.patch deleted file mode 100644 index 3db6669704..0000000000 --- a/srcpkgs/weather/patches/10-py3-decode.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 2a84a53f4aac0175f75b77e3a73d5a68b6e20ac6 Mon Sep 17 00:00:00 2001 -From: Jeremy Stanley -Date: Fri, 10 Mar 2017 15:13:31 +0000 -Subject: [PATCH] Fix Py3K compatibility for compressed correlation - -When run under Python 3.x, explicitly decode decompressed -bytestreams if reading pre-compressed correlation data files. ---- - weather.py | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -diff --git a/weather.py b/weather.py -index b5b71a1..af43de4 100644 ---- weather.py -+++ weather.py -@@ -744,7 +744,10 @@ def guess( - datafile = datafiles[dataname][0] - if datafile.endswith(".gz"): - import gzip -- stations.readfp( gzip.open(datafile) ) -+ if pyversion("3"): -+ stations.read_string( -+ gzip.open(datafile).read().decode("utf-8") ) -+ else: stations.readfp( gzip.open(datafile) ) - else: - stations.read(datafile) - else: -@@ -760,7 +763,9 @@ def guess( - datafile = datafiles[dataname][0] - if datafile.endswith(".gz"): - import gzip -- zones.readfp( gzip.open(datafile) ) -+ if pyversion("3"): -+ zones.read_string( gzip.open(datafile).read().decode("utf-8") ) -+ else: zones.readfp( gzip.open(datafile) ) - else: - zones.read(datafile) - else: -@@ -784,7 +789,10 @@ def guess( - datafile = datafiles[dataname][0] - if datafile.endswith(".gz"): - import gzip -- airports.readfp( gzip.open(datafile) ) -+ if pyversion("3"): -+ airports.read_string( -+ gzip.open(datafile).read().decode("utf-8") ) -+ else: airports.readfp( gzip.open(datafile) ) - else: - airports.read(datafile) - else: -@@ -870,7 +878,10 @@ def guess( - datafile = datafiles[dataname][0] - if datafile.endswith(".gz"): - import gzip -- zctas.readfp( gzip.open(datafile) ) -+ if pyversion("3"): -+ zctas.read_string( -+ gzip.open(datafile).read().decode("utf-8") ) -+ else: zctas.readfp( gzip.open(datafile) ) - else: - zctas.read(datafile) - else: -@@ -925,7 +936,10 @@ def guess( - datafile = datafiles[dataname][0] - if datafile.endswith(".gz"): - import gzip -- places.readfp( gzip.open(datafile) ) -+ if pyversion("3"): -+ places.read_string( -+ gzip.open(datafile).read().decode("utf-8") ) -+ else: places.readfp( gzip.open(datafile) ) - else: - places.read(datafile) - else: - diff --git a/srcpkgs/weather/patches/20-faq-headers.patch b/srcpkgs/weather/patches/20-faq-headers.patch deleted file mode 100644 index 804773d55e..0000000000 --- a/srcpkgs/weather/patches/20-faq-headers.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1ec2848c205249420d64d7924f2ee1840efff140 Mon Sep 17 00:00:00 2001 -From: Jeremy Stanley -Date: Sat, 16 Sep 2017 15:47:03 +0000 -Subject: [PATCH] Add FAQ entry about --headers values - -Be as clear as possible about what the --headers command-line option -or headers configuration option does, and what sorts of values are -valid for it. ---- - FAQ | 24 +++++++++++++++++++++++- - 1 file changed, 23 insertions(+), 1 deletion(-) - -diff --git a/FAQ b/FAQ -index 1e0ff03..280c0af 100644 ---- FAQ -+++ FAQ -@@ -2,7 +2,7 @@ - Frequently Asked Questions About the Weather Utility - ====================================================== - --:Copyright: (c) 2006-2012 Jeremy Stanley . Permission -+:Copyright: (c) 2006-2017 Jeremy Stanley . Permission - to use, copy, modify, and distribute this software is - granted under terms provided in the LICENSE file distributed - with this software. -@@ -54,3 +54,25 @@ As of the 2.0 release, this question is no longer relevant. - --------------------------------------------------------------- - As of the 2.0 release, this is no longer necessary. See FAQ entries #2 - and #3 for more detail. -+ -+7. What values are valid for a --headers list? -+---------------------------------------------- -+The default set it uses if you don't override it yourself on the command -+line or in configuration is as follows:: -+ -+ heat_index -+ precipitation_last_hour -+ relative_humidity -+ sky_conditions -+ temperature -+ weather -+ wind -+ windchill -+ -+These are a case-insensitive match against the start of lines in a -+decoded METAR up to the first colon (:) with underscores (_) replaced by -+spaces. You can see the full METAR for a given condition report by -+passing --verbose or by observing one directly (perhaps by looking in -+your *datacache* directory). Unfortunately I haven't found any proper -+specification for the decoded METAR format used by the NWS so know of no -+comprehensive list of what lines might appear. diff --git a/srcpkgs/weather/template b/srcpkgs/weather/template index 3ac33bfac1..5676d81988 100644 --- a/srcpkgs/weather/template +++ b/srcpkgs/weather/template @@ -1,18 +1,16 @@ # Template file for 'weather' pkgname=weather -version=2.3 -revision=3 +version=2.4 +revision=1 archs=noarch -hostmakedepends="python3" depends="python3" -pycompile_module="weather.py" conf_files="/etc/weatherrc" -short_desc="A CLI utility for current (METAR) weather conditions and forecasts" +short_desc="CLI utility for current (METAR) weather conditions and forecasts" maintainer="Richard Taityr " license="ISC" homepage="http://fungi.yuggoth.org/weather/" distfiles="http://fungi.yuggoth.org/${pkgname}/src/${pkgname}-${version}.tar.xz" -checksum=86148d2f1d59867f637f52558cc2a6b3280fac94df55c6e5af0ce37cc190d146 +checksum=6a5bac6110922b584ee635ddfce7594f8a3fea6b0b2763435bd641f6c9a4c420 do_install() { vbin weather