Hello community,

here is the log from the commit of package python-pymetar for openSUSE:Factory 
checked in at 2012-04-03 09:20:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pymetar (Old)
 and      /work/SRC/openSUSE:Factory/.python-pymetar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pymetar", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pymetar/python-pymetar.changes    
2012-02-17 12:09:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-pymetar.new/python-pymetar.changes       
2012-04-03 09:20:34.000000000 +0200
@@ -1,0 +2,11 @@
+Fri Mar 30 13:14:36 UTC 2012 - [email protected]
+
+- Update to version 0.19:
+  + Fix COPYING, make man page installable.
+  + More GPL fixes and single-char-obj cleanup.
+  + Typo-fix & regenerate man page and HTML.
+  + Fix RE bug in condition extraction code.
+  + Add test for sky conditions.
+- Drop python-pymetar-add-manpage.patch as fix upstreamed.
+
+-------------------------------------------------------------------

Old:
----
  pymetar-0.18.tar.gz
  python-pymetar-add-manpage.patch

New:
----
  pymetar-0.19.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pymetar.spec ++++++
--- /var/tmp/diff_new_pack.RPDRvS/_old  2012-04-03 09:20:36.000000000 +0200
+++ /var/tmp/diff_new_pack.RPDRvS/_new  2012-04-03 09:20:36.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package pymetar
+# spec file for package python-pymetar
 #
 # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # Copyright (c) 2012 Malcolm J Lewis <[email protected]>
@@ -16,21 +16,20 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 #FIXME: Email sent 24th Jan 2012 to developer to request updating FSF
 #       address in next release.
 
 %define         modname pymetar
 
 Name:           python-%{modname}
-Version:        0.18
+Version:        0.19
 Release:        0
-License:        GPL-2.0+
 Summary:        METAR weather report parser
-Url:            http://www.schwarzvogel.de/software-pymetar.shtml
+License:        GPL-2.0+
 Group:          Development/Languages/Python
-Source0:        http://www.schwarzvogel.de/pkgs/pymetar-0.18.tar.gz
-# PATCH-FIX-UPSTREAM python-pymetar-add-manpage.patch 
[email protected] -- Add man page install in setup.py.
-Patch0:         python-pymetar-add-manpage.patch
+Url:            http://www.schwarzvogel.de/software-pymetar.shtml
+Source0:        http://www.schwarzvogel.de/pkgs/pymetar-0.19.tar.gz
 BuildRequires:  python-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version}
@@ -47,7 +46,6 @@
 
 %prep
 %setup -q -n %{modname}-%{version}
-%patch0 -p1
 
 %build
 python setup.py build

++++++ pymetar-0.18.tar.gz -> pymetar-0.19.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymetar-0.18/COPYING new/pymetar-0.19/COPYING
--- old/pymetar-0.18/COPYING    2011-01-22 17:36:12.000000000 +0100
+++ new/pymetar-0.19/COPYING    2012-01-25 15:00:24.000000000 +0100
@@ -2,8 +2,8 @@
                        Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          59 Temple Place, Suite 330
-                          Boston, MA 02111-1307, USA.
+                          51 Franklin Street, Fifth Floor,
+                          Boston, MA 02110-1301, USA.
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymetar-0.18/PKG-INFO new/pymetar-0.19/PKG-INFO
--- old/pymetar-0.18/PKG-INFO   2011-10-30 12:59:06.000000000 +0100
+++ new/pymetar-0.19/PKG-INFO   2012-03-30 11:53:22.000000000 +0200
@@ -1,7 +1,7 @@
 Metadata-Version: 1.0
 Name: pymetar
-Version: 0.18
-Summary: Pymetar v0.18 (c) 2002-2011 Tobias Klausmann
+Version: 0.19
+Summary: Pymetar (c) 2002-2012 Tobias Klausmann
 
 Pymetar is a python module and command line tool designed to fetch Metar
 reports from the NOAA (http://www.noaa.gov) and allow access to the
@@ -19,9 +19,7 @@
 
 You should have received a copy of the GNU General Public License along
 with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-
-Please e-mail bugs to: [email protected]
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 Home-page: http://www.schwarzvogel.de/software-pymetar.shtml
 Author: Tobias Klausmann
 Author-email: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymetar-0.18/librarydoc.txt 
new/pymetar-0.19/librarydoc.txt
--- old/pymetar-0.18/librarydoc.txt     2011-10-30 12:53:35.000000000 +0100
+++ new/pymetar-0.19/librarydoc.txt     2012-01-25 15:02:39.000000000 +0100
@@ -1,7 +1,7 @@
 Help on module pymetar:
 
 NAME
-    pymetar - Pymetar v0.18 (c) 2002-2011 Tobias Klausmann
+    pymetar - Pymetar v0.19 (c) 2002-2011 Tobias Klausmann
 
 FILE
     pymetar.py
@@ -276,10 +276,10 @@
     CLOUD_RE_STR = '^(CAVOK|CLR|SKC|BKN|SCT|FEW|OVC|NSC)([0-9]{3})(CB)?$'
     COND_RE_STR = r'^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|...S|U...
     __author__ = '[email protected]'
-    __version__ = '0.18'
+    __version__ = '0.19'
 
 VERSION
-    0.18
+    0.19
 
 AUTHOR
     [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymetar-0.18/pymetar.1 new/pymetar-0.19/pymetar.1
--- old/pymetar-0.18/pymetar.1  2011-02-09 14:24:52.000000000 +0100
+++ new/pymetar-0.19/pymetar.1  2012-03-16 09:56:12.000000000 +0100
@@ -1,10 +1,10 @@
 .\" generated with Ronn/v0.7.3
 .\" http://github.com/rtomayko/ronn/tree/0.7.3
 .
-.TH "PYEMTAR" "1" "February 2011" "" ""
+.TH "PYMETAR" "1" "February 2011" "" ""
 .
 .SH "NAME"
-\fBpyemtar\fR \- query METAR information and display it in a user\-friendly way
+\fBpymetar\fR \- query METAR information and display it in a user\-friendly way
 .
 .SH "SYNOPSIS"
 \fBpymetar\fR [station]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymetar-0.18/pymetar.py new/pymetar-0.19/pymetar.py
--- old/pymetar-0.18/pymetar.py 2011-10-30 12:54:23.000000000 +0100
+++ new/pymetar-0.19/pymetar.py 2012-03-26 23:06:54.000000000 +0200
@@ -1,32 +1,6 @@
 # -*- coding: utf8 -*-
-"""This is just here to make pylint happy """
-# Copyright (C) 2002-2011  Tobias Klausmann
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.        See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330 Boston, MA
-
-import fpformat
-import math
-import re
-import urllib2
-
-__author__ = "[email protected]"
-
-__version__ = "0.18"
-__revision__ = "$Rev$"[6:-2]
-
-__doc__ = """Pymetar v%s (c) 2002-2011 Tobias Klausmann
+# pylint: disable-msg=C0103 # Disable naming style messages
+"""Pymetar (c) 2002-2012 Tobias Klausmann
 
 Pymetar is a python module and command line tool designed to fetch Metar
 reports from the NOAA (http://www.noaa.gov) and allow access to the
@@ -44,14 +18,23 @@
 
 You should have received a copy of the GNU General Public License along
 with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA."""
+
+import fpformat
+import math
+import re
+import urllib2
 
-Please e-mail bugs to: %s""" % (__version__, __author__)
+__author__ = "[email protected]"
+
+__version__ = "0.19"
+__revision__ = "$Rev$"[6:-2]
 
 
-CLOUD_RE_STR = 
r"^(CAVOK|CLR|SKC|BKN|SCT|FEW|OVC|NSC)([0-9]{3})?(TCU|CU|CB|SC|CBMAM|ACC|SCSL|CCSL|ACSL)?$"
-CTYPE_RE_STR = r"^(TCU|CU|CB|SC|CBMAM|ACC|SCSL|CCSL|ACSL)?$"
-COND_RE_STR  = 
r"^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|SG|IC|PE|GR|GS|UP|BR|FG|FU|VA|SA|HZ|PY|DU|SQ|SS|DS|PO|\\+?FC)$"
+CLOUD_RE_STR = (r"^(CAVOK|CLR|SKC|BKN|SCT|FEW|OVC|NSC)([0-9]{3})?"
+                r"(TCU|CU|CB|SC|CBMAM|ACC|SCSL|CCSL|ACSL)?$")
+COND_RE_STR  = (r"^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|SG|IC|PE|"
+                r"GR|GS|UP|BR|FG|FU|VA|SA|HZ|PY|DU|SQ|SS|DS|PO|\\+?FC)$")
 
 class EmptyReportException(Exception):
     """This gets thrown when the ReportParser gets fed an empty report"""
@@ -69,7 +52,7 @@
 # It seems the NOAA doesn't want to return plain text, but considering the
 # format of their response, this is not to save bandwidth :-)
 
-_WeatherConditions = {
+_WEATHER_CONDITIONS = {
                       "DZ" : ("Drizzle", "rain", {
                                "" :   "Moderate drizzle",
                                "-" :  "Light drizzle",
@@ -379,7 +362,7 @@
         return ("%s-%s-%s %s:%s:00Z" %
                 (year, month, day, hour[:2], hour[2:4]))
 
-def parseLatLong(latlong):
+def _parse_lat_long(latlong):
     """
     Parse Lat or Long in METAR notation into float values. N and E
     are +, S and W are -. Expects one positional string and returns
@@ -391,41 +374,34 @@
     if latlong is None:
         return None
 
-    s = latlong.upper().strip()
-    elms = s.split('-')
-    ud = elms[-1][-1]
-    elms[-1] = elms[-1][:-1]
-    elms = [int(i) for i in elms]
+    cap_inp = latlong.upper().strip()
+    elements = cap_inp.split('-')
+    # Extract N/S/E/W
+    compass_dir = elements[-1][-1]
+    # get rid of compass direction
+    elements[-1] = elements[-1][:-1]
+    elements = [int(i) for i in elements]
     coords = 0.0
-    elen = len(elms)
+    elen = len(elements)
     if elen > 2:
-        coords = coords + float(elms[2])/3600.0
+        coords = coords + float(elements[2])/3600.0
 
     if elen > 1:
-        coords = coords + float(elms[1])/60.0
+        coords = coords + float(elements[1])/60.0
 
-    coords = coords + float(elms[0])
+    coords = coords + float(elements[0])
 
-    if ud in ('W', 'S'):
+    if compass_dir in ('W', 'S'):
         coords = -1.0*coords
 
-    f, i = math.modf(coords)
-
-    if elen > 2:
-        f = float(fpformat.sci(f, 4))
-    elif elen > 1:
-        f = float(fpformat.sci(f, 2))
-    else:
-        f = 0.0
-
-    return f+i
+    return coords
 
 class WeatherReport:
     """Incorporates both the unparsed textual representation of the
     weather report and the parsed values as soon as they are filled
     in by ReportParser."""
 
-    def _ClearAllFields(self):
+    def _clearallfields(self):
         """Clear all fields values."""
         # until finished, report is invalid
         self.valid = 0
@@ -467,7 +443,7 @@
 
     def __init__(self, MetarStationCode = None):
         """Clear all fields and fill in wanted station id."""
-        self._ClearAllFields()
+        self._clearallfields()
         self.givenstationid = MetarStationCode
 
     def getFullReport(self):
@@ -812,7 +788,7 @@
         string and a suggested pixmap name for an icon representing said
         sky condition.
         """
-        matches = self.match_WeatherPart(CTYPE_RE_STR)
+        matches = self.match_WeatherPart(COND_RE_STR)
         for wcond in matches:
             if ((len(wcond)>3) and
                 (wcond.startswith('+') or wcond.startswith('-'))):
@@ -825,7 +801,7 @@
                 pphen = 2
             squal = wcond[:pphen]
             sphen = wcond[pphen : pphen + 4]
-            phenomenon = _WeatherConditions.get(sphen, None)
+            phenomenon = _WEATHER_CONDITIONS.get(sphen, None)
             if phenomenon is not None :
                 (name, pixmap, phenomenon) = phenomenon
                 pheninfo = phenomenon.get(squal, name)
@@ -845,9 +821,9 @@
         """
         matches = []
         if self.Report.code is not None :
-            rg = re.compile(regexp)
+            myre = re.compile(regexp)
             for wpart in self.Report.getRawMetarCode().split() :
-                match = rg.match(wpart)
+                match = myre.match(wpart)
                 if match:
                     matches.append(match.string[match.start(0) : match.end(0)])
         return matches
@@ -879,7 +855,7 @@
             if header.find("("+self.Report.givenstationid+")") != -1:
                 id_offset = header.find("("+self.Report.givenstationid+")")
                 loc = data[:id_offset]
-                p = data[id_offset:]
+                coords = data[id_offset:]
                 try:
                     loc = loc.strip()
                     rloc = loc[::-1]
@@ -887,13 +863,13 @@
                 except ValueError:
                     rcity = ""
                     rcoun = ""
-                    p = data
+                    coords = data
                 try:
-                    lat, lng, ht = p.split()[1:4]
-                    ht = int(ht[:-1]) # cut off 'M' for meters
+                    lat, lng, alt = coords.split()[1:4]
+                    alt = int(alt[:-1]) # cut off 'M' for meters
                 except ValueError:
-                    (lat, lng) = p.split()[1:3]
-                    ht = None
+                    (lat, lng) = coords.split()[1:3]
+                    alt = None
                 # A few jokers out there think O==0
                 if "O" in lat:
                     lat = lat.replace("O", "0")
@@ -905,33 +881,33 @@
                 self.Report.fulln = loc
                 self.Report.latitude = lat
                 self.Report.longitude = lng
-                self.Report.latf = parseLatLong(lat)
-                self.Report.longf = parseLatLong(lng)
-                self.Report.altitude = ht
+                self.Report.latf = _parse_lat_long(lat)
+                self.Report.longf = _parse_lat_long(lng)
+                self.Report.altitude = alt
 
             # The line containing date and time of the report
             # We have to make sure that the station ID is *not*
             # in this line to avoid trying to parse the ob: line
             elif ((data.find(" UTC")) != -1 and
                   (data.find(self.Report.givenstationid)) == -1):
-                rt = data.split("/")[1]
-                self.Report.rtime = rt.strip()
+                rtime = data.split("/")[1]
+                self.Report.rtime = rtime.strip()
 
             # temperature
 
             elif (header == "Temperature"):
-                f, c = data.split(None, 3)[0:3:2]
-                self.Report.tempf = float(f)
+                fnht, cels = data.split(None, 3)[0:3:2]
+                self.Report.tempf = float(fnht)
                 # The string we have split is "(NN C)", hence the slice
-                self.Report.temp = float(c[1:])
+                self.Report.temp = float(cels[1:])
 
             # wind chill
 
             elif (header == "Windchill"):
-                f, c = data.split(None, 3)[0:3:2]
-                self.Report.w_chillf = float(f)
+                fnht, cels = data.split(None, 3)[0:3:2]
+                self.Report.w_chillf = float(fnht)
                 # The string we have split is "(NN C)", hence the slice
-                self.Report.w_chill = float(c[1:])
+                self.Report.w_chill = float(cels[1:])
 
             # wind dir and speed
 
@@ -951,12 +927,10 @@
                     self.Report.windcomp = None
                 else:
                     fields = data.split(" ", 9)[0:9]
-                    f = fields[0]
                     comp = fields[2]
                     deg = fields[3]
                     speed = fields[6]
                     speedkt = fields[8][1:]
-                    del fields
                     self.Report.winddir = int(deg[1:])
                     self.Report.windcomp = comp.strip()
                     self.Report.windspeed = (float(speed)*0.44704)
@@ -966,9 +940,9 @@
             # visibility
 
             elif (header == "Visibility"):
-                for d in data.split():
+                for visgroup in data.split():
                     try:
-                        self.Report.vis = float(d)*1.609344
+                        self.Report.vis = float(visgroup)*1.609344
                         break
                     except ValueError:
                         self.Report.vis = None
@@ -977,10 +951,10 @@
             # dew point
 
             elif (header == "Dew Point"):
-                f, c = data.split(None, 3)[0:3:2]
-                self.Report.dewpf = float(f)
+                fnht, cels = data.split(None, 3)[0:3:2]
+                self.Report.dewpf = float(fnht)
                 # The string we have split is "(NN C)", hence the slice
-                self.Report.dewp = float(c[1:])
+                self.Report.dewp = float(cels[1:])
 
             # humidity
 
@@ -991,10 +965,10 @@
             # pressure
 
             elif (header == "Pressure (altimeter)"):
-                p = data.split(" ", 1)[0]
-                self.Report.press = (float(p)*33.863886)
+                press = data.split(" ", 1)[0]
+                self.Report.press = (float(press)*33.863886)
                 # 1 in = 25.4 mm => 1 inHg = 25.4 mmHg
-                self.Report.pressmmHg = (float(p)*25.4000)
+                self.Report.pressmmHg = (float(press)*25.4000)
 
             # shot weather desc. ("rain", "mist", ...)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pymetar-0.18/setup.py new/pymetar-0.19/setup.py
--- old/pymetar-0.18/setup.py   2011-06-03 16:24:32.000000000 +0200
+++ new/pymetar-0.19/setup.py   2012-01-25 15:01:19.000000000 +0100
@@ -27,5 +27,6 @@
       py_modules=["pymetar"],
       scripts = [ "bin/pymetar" ], 
       data_files = [("share/doc/pymetar-%s"%pymetar.__version__,
-       ['README', 'COPYING', 'THANKS', 'librarydoc.txt'])]
+       ['README', 'COPYING', 'THANKS', 'librarydoc.txt']),
+       ("share/man/man1", ['pymetar.1'])]
       )

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to