[pygrib] 02/02: Add debian/ from jessie

Alastair McKinstry mckinstry at moszumanska.debian.org
Thu Jun 25 15:51:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to tag unstable/1.9.9-2
in repository pygrib.

commit 47e6f974cb4062b57c47ce693d4fb310198dad25
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Fri May 1 07:07:32 2015 +0100

    Add debian/ from jessie
---
 debian/changelog                   |  75 ++++++++++
 debian/changelog.upstream          | 289 +++++++++++++++++++++++++++++++++++++
 debian/compat                      |   1 +
 debian/control                     |  59 ++++++++
 debian/copyright                   |  20 +++
 debian/man/cnvgrib1to2.1           |  39 +++++
 debian/man/cnvgrib2to1.1           |  21 +++
 debian/man/grib_list.1             |  23 +++
 debian/man/grib_repack.1           |  49 +++++++
 debian/patches/packed-4bytes.patch |  32 ++++
 debian/patches/series              |   2 +
 debian/patches/use_g2clib.patch    |  79 ++++++++++
 debian/python-grib-doc.docs        |   2 +
 debian/python-grib-doc.examples    |   1 +
 debian/python-grib-doc.manpages    |   1 +
 debian/python-grib.install         |   1 +
 debian/python3-grib.install        |   2 +
 debian/rules                       |  26 ++++
 debian/source/format               |   1 +
 debian/watch                       |   3 +
 20 files changed, 726 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..801499b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,75 @@
+pygrib (1.9.9-2) unstable; urgency=medium
+
+  * Standards-Version: 3.9.6, no changes required.
+  * Fix from Rostislav Kouznetsov for segfault on 4-byte DRTs.
+    LP: #1308040.
+  * Fix Section from doc to python.
+  * Acknowledge older Ubuntu bugs now fixed: LP: #1362109, #1308039.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Sun, 19 Oct 2014 14:02:22 +0100
+
+pygrib (1.9.9-1) unstable; urgency=medium
+
+  * New upstream release
+  * Move to Standards-Version: 3.9.5.
+  * Move python-grib-docs to section: doc
+  * Fix spelling mistake in description.
+  * python modules now depend on -dev versions of libraries they use.
+    Closes: #760130.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Mon, 01 Sep 2014 13:51:37 +0100
+
+pygrib (1.9.8-1) unstable; urgency=low
+
+  * New upstream release.
+  * Add upstream changelog: debian/changelog.upstream.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 27 Nov 2013 15:38:45 +0000
+
+pygrib (1.9.7-1) unstable; urgency=low
+
+  * New upstream release.
+    - Includes man pages from Debian.
+  * Move to debhelper 9.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 08 Nov 2013 09:33:35 +0000
+
+pygrib (1.9.6-3) unstable; urgency=low
+
+  [Alastair McKinstry]
+  * Add dependencies for python3.
+
+  [Scott Kidderman]
+  * Finish Python 3 support (Closes: #721209).
+   - Build with python3 and buildsystem pybuild
+   - Add dh-python to build-dep for pybuild
+   - Add python3-nuumpy to build-depends and add dh_numpy3 to debian/rules
+   - Simplify debian/rules
+   - Add python3-grib to debian/control
+   - Move documentation and examples to common python-grib-doc package
+   - Add python/3-grib.install 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 30 Aug 2013 14:11:51 +0100
+
+pygrib (1.9.6-2) unstable; urgency=low
+
+  * Fix error in updated patch; macros was not set, causing failure on
+    64-bit systems.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 06 Jun 2013 12:33:01 +0100
+
+pygrib (1.9.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * Move to Standards-Version: 3.9.4. 
+  * Transition from python-support.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Sun, 19 May 2013 06:08:43 +0100
+
+pygrib (1.9.3-1) unstable; urgency=low
+
+  * Initial release. (Closes: #669260).
+    Ttarball has upstream g2clib_src directory removed. Used libgrib2c 
+    library.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 18 Apr 2012 16:59:41 +0100
diff --git a/debian/changelog.upstream b/debian/changelog.upstream
new file mode 100644
index 0000000..0767e54
--- /dev/null
+++ b/debian/changelog.upstream
@@ -0,0 +1,289 @@
+version 1.9.8 (svn tag v1.9.8rel)
+=================================
+* to be consistent with what the grib_api lib does, don't flip data grids
+  when jScansPositively=0 or iScansNegatively=1 (issue 77).
+* fix segfaulting in ncepgrib2.py when interpolating from reduced to regular
+  grids.
+* raise exception in redtoreg.pyx if number of points on reduced grid
+  does not equal number of data values (to prevent segfault).
+* add -m option to grib_list (same as -s, but also print min/max of data).
+* add 'tolerate_badgrib' module variable. When set to True (default False)
+  execptions won't be raised when grib files are encountered with missing or
+  malformed keys. Toggle with tolerate_badgrib_on() and
+  tolerate_badgrib_off().
+* add man pages (thanks to Jos De Klos and Alastair McKinstry). Modify
+  setup.py to install man pages in MAN_DIR/man1 (MAN_DIR is an environment
+  variable, or can be set in setup.cfg).
+* fix for issue 80 (remove mention of --packing_scheme from 
+  grib_repack help message).
+
+version 1.9.7 (svn revision 660)
+================================
+* add 'data' method for gribmessage that returns data, lats and lons
+  for a subset region (defined by bounding lat and lon values).
+* fix for GRIB1 mercator data (issue 72).
+* added 'expand_grid' method to gribmessage - toggles expansion of
+  reduced grids to regular grids.  Expansion is on by default, to turn
+  off use grb.expand_grid(False).
+* added runtime_library_dirs to Extension in setup.py (so correct library
+  path is built in when linking shared libs).
+
+version 1.9.6 (svn revision 642)
+================================
+* fixed print statement in setup.py and regenerated C interfaces with
+  new version of Cython to fix python 3.3 errors.
+* print warning when trying to create an index from a file with
+  multi-field messages.  This is because keys inside multi-field messages
+  will not be indexed correctly by the grib_api library
+  (https://software.ecmwf.int/issues/browse/SUP-275). Partially addresses
+  issue 61.
+
+version 1.9.5 (svn revision 631)
+================================
+* avoid crashing when julianDay is miscoded (by just not setting analDate,
+  validDate keys).
+* update g2clib source to version 1.4.0.
+* fix compilation issue when jpeg/openjpeg or png not needed (issue 59).
+* add __dealloc__ method that closes file handles when no more 
+  references exist to the object.
+* fix radius of the earth definition of WGS84 ellipsoid, use 'radius' key
+  to set earth radius if available (issue 58).
+* change behaviour of select method (for index and open objects)
+  so that an error is raised if there are no matches. 
+  This avoids a segfault that happens if the select method is
+  called for an index created from an empty file.
+
+version 1.9.4 (svn revision 610)
+================================
+* Added 'write' method to index, so grib index can be saved.
+  Saved grid index can be re-loaded using pygrib.index(filename)
+  (if no keys are specified, then filename is assumed to represent
+  a saved index instead of grib file).
+* added MacPorts portfile (so it can be installed via MacPorts
+  on macosx using a "local Portfile repository").
+* assume forecastTime=0 if missing when computing analDate, verifDate keys.
+* reset iterator in rewind method (fixes issue 54).
+
+version 1.9.3 (svn revision 583)
+================================ 
+* workaround for bug in grib_api 1.9.16 (distinctLongitudes are
+  wrong when longitudeOfLastGridPoint < 0).
+* exposed setdates function, which can be used to update analDate and
+  validDate keys when forecastTime and/or julianDay keys are changes.
+* added "reload" function to update all keys in gribmessage instance
+  to be consistent with modified keys.
+* update test.py so tests pass with grib_api 1.9.16.
+* update NCEP grib lib (g2clib) to version 1.2.3.
+* ncepgrib2.Grib2Encode.addfield now accepts masked arrays
+  (the bitmap is automatically created from the mask). bitmapflag and 
+  bitmap keywords removed. scan order is now automatically taken care of.
+
+version 1.9.2 (svn revision 544)
+================================
+* python 3 fix for ncepgrib2.
+* change behavior of open.select, so that it always searches
+  from beginning of file (not from where iterator is currently
+  positioned).
+* fix calculation of longitudes for gridType='regular_ll', when
+  longitudeOfLastGridPoint < longitudeOfFirstGridPoint.  For 
+  example, for ECMWF grids sometimes longitudeOfFirstGridPoint = 0
+  and longitudeOfLastGridPoint = -0.5.  In such cases, 
+  longitudeOfLastGridPoint should be treated as 359.5 (issue 39)
+
+version 1.9.1 (svn revision 527)
+================================
+* validDate now correctly defined if forecast time units
+  is minutes or days, not just hours. If forecast time is 
+  a range, validDate corresponds to the end of the range.
+  fcstimeunits gribmessage instance variable added.
+* fix bug for reg lat/lon and gaussian grids introduced in 1.9.0.
+* add type of forecast interval (max,accum,avg) to gribmessage.__repr__
+* add forecast time units in gribmessage.__repr__
+* fix bug in ncepgrib2 (issue 38)
+
+version 1.9.0 (svn revision 511)
+================================
+* use numpy.ma.isMA instead of hasattr(arr,'mask').
+* include ncep grib2 lib and python interface (ncepgrib2 module).  This
+  is used by pygrib to decode grib messages with packingType='grid_complex'
+  and 'grid_complex_spatial_differencing' since grib_api does not decode
+  these messages correctly.  ncepgrib2.Grib2Encode also provides a way to
+  create grib2 messages from scratch.
+* grb.__repr__ returns parameterName and parameterUnits, if name and units
+  keys don't exist (issue 36).
+* regenerate with Cython 0.15.1, fix a couple of latent bugs found by new Cython
+  compiler.
+
+version 1.8.4 - svn revision 478
+================================
+* make sure _set_projparams is called by fromstring (issue 33).
+* add __enter__ and __exit__ methods so you can do "with pygrib.open(filename) as f:"
+* set projparams instance variable when grib message is created, instead of
+  when latlons method called (issue 27).
+
+version 1.8.3 - svn revision 442
+================================
+* repacked example grib files to prevent tests from failing.  Test failures
+  ocurred for grib messages using second-order complex
+  packing, due to a bug introduced in the grib_api library in version 1.9.8.
+
+version 1.8.2 - svn revision 434
+================================
+* Python 3 support. 
+* changed name of grib1to2 and grib2to1 to cnvgrib1to2 and cnvgrib2to1
+  to avoild conflict with scripts installed by grib_api-1.9.5 (fixes
+  issue 22).
+* added utils grib1to2 and grib2to1 to MANIFEST (they were not included in
+  1.8.1).
+* fix open.seek so it works for negative offsets when from_what=1.
+* grib_api_version module var changed from int to string (10905 --> '1.9.5').
+
+version 1.8.1 - svn revision 393
+================================
+* in grib_api 1.9.5, grib_count_in_file does not count
+  individual messages inside multi-part messages (as it did in previous
+  versions).  So, instead of calling that routine pygrib now counts them
+  internally.
+* open.select now puts iterator back in original position.
+* fix bug in open.message (message(N) was advancing N messages, not
+  going to message number N).
+* use julian_to_datetime to automatically create gribmessage analDate
+  and validDate attributes.
+* added julian_to_datetime and datetime_to_julian functions.
+* added "fromstring" function (reverse of gribmessage.tostring).
+* regenerated C source with Cython 0.14.1
+* print grib api version after running tests with test.py.
+* readline() returns None if EOF encountered (instead of raising an exception).
+* added grib1to2 and grib2to1 utilites.
+
+version 1.8.0 - svn revision 377
+================================
+* make pygrib.open objects behave more like regular python file objects.
+  Added seek,tell,read,readline methods.  'filename' attribute changed to
+  'name', 'closed' attribute added.
+* slicing the iterator using __getitem__ does not change position of
+  iterator.
+* force 'paramId' to be a scalar integer, not an integer array.
+* arrays initialized to zero (use np.zeros instead of np.empty).  Now
+  values returned in "paramId" are repeatable, don't contain random garbage
+  in undefined elements.
+* now verified to work with Python 2.4.
+
+version 1.7.2 - svn revision 303
+================================
+* select method of open instance can now use functions to 
+  filter keys based on conditional expressions. For example,
+  sel_grbs = grbs.select(shortName='gh',level=lambda l: l < 500 and l > 300)
+  returns geoptential height levels between 500 and 300.
+* fix a couple of instances where PyString_AsString was used
+  incorrectly, replaced with PyString_FromString. Exposed by
+  cython 0.13 beta, but should have no user-visible effects.
+* valid_key method added, tests to see if message has a key,
+  it's value is not missing and can be read.  Now used in 
+  gribmessage.__repr__, so it should never fail on a bad key.
+* added new tpc tropical storm wind probability example.
+* add more ensemble info, probability info to gribmessage.__repr__.
+* gribmessage __repr__ provides more useful level information (including
+  units).
+
+version 1.7.1 - svn revision 263
+================================
+* try to import pyproj, and if that fails try to import pyproj
+  from mpl_toolkits.basemap.
+* reduced verbosity of grib_list.
+* made grib_list more robust (prints "NOT FOUND" when there is an error
+  reading the value for a key).
+* allow for specifying header and library directories separately
+  (e.g. GRIBAPI_INCDIR and GRIBAPI_LIBDIR env vars, instead of just
+  GRIBAPI_DIR)
+* fix setup.py to reference zlib as "-lz", not "-lzlib" (issue 9).
+
+version 1.7 - svn revision 251
+==============================
+* added is_missing grib message method (to check if the value associated
+  with a key is set to the grib missing value constant).
+* grib_api_version module variable contains version info for grib_api lib.
+* added *_LIBDIR and *_INCDIR env vars to setup.py for more flexible
+  specification of library and include dir locations.
+* fix bugs in handling of scale factor for radius of the earth.
+* some grids use the key "projectionCentreFlag",
+  while some use "projectionCenterFlag". Account for 
+  both possibilities (added to test_stere.py).
+* missingvalue_int and missingvalue_float are now module variables
+  (not instance variables).
+* raise error if no keys are specified when creating index instance.
+
+version 1.6.1 - svn revision 227
+================================
+* only print ensemble info in __repr__ (which is called when 'print grb' is
+  done) when both both 'perturbationNumber' and 'typeOfEnsembleForecast' keys are
+  present. Fixes error on 'print grb' for ERA-interim grib files.
+
+version 1.6 - svn revision 223
+==============================
+* raise IOError when grib message number < 1 is accessed with message method
+  (instead of segfaulting, which is rude).  Fixes issue 4.
+* indexing open instance (iterator) with an integer key now is the same as
+  calling the message method (grbs.message(2) == grbs[2]).
+* slicing iterator now also works (grbs[::2] returns every other grib message
+  in a list).
+* added 'select' method to open instance for selecting grib messages based
+  on key/value pairs.
+* added 'index' class which can be used for fast subsettting of grib files 
+  based on specified key/value pairs (a faster alternative to 'select' method
+  of open instance).
+* fixes for grib_api version 1.9.0 (the names of some keys changed).
+
+version 1.5 - svn revsion 187
+=============================
+* fix bug in latlons method for space_view grids not centered
+  on the equator at Greenwich.
+* compatibility fixes for version 1.8.0.1 of grib_api definitions
+  (the names of several keys changed from version 1.8.0).
+* use __cinit__ to initialize C level objects, __init__ for
+  python level objects (instead of doing everything in __new__).
+
+version 1.4 - svn revision 172
+==============================
+* allow gribmessage keys to be set or accessed like attributes.
+* added __dealloc__ method to gribmessage to allow for garbage collection.
+  Prevents out of memory errors when iterating over large numbers of grib
+  messages.
+
+version 1.3 - svn revision 153
+==============================
+* make sure gribmessage instances are created from clones
+  of grib handle, so information is retained when state of parent
+  grib iterator is modified.
+
+version 1.2 - svn revision 152
+==============================
+* fix issue 2 - segault when iterating over certain grib files 
+  (those at ftp://ftp.ssec.wisc.edu/pub/eosdb/dbcras, for example).
+
+version 1.1 - svn revision 147
+==============================
+* fix segfault that occured when iterator hit end of file and grib message was
+  accessed.
+* fix __repr__ so level information is correctly printed for GRIB1 files.
+* fix setup.py to find openjpeg and jasper headers on Ubuntu.
+* use doctest in test.py.
+
+version 1.0 - svn revision 124
+==============================
+* fix formatting of analysis time in gribmessage __repr__.
+* add command line utilites grib_list and grib_repack.
+* added support for rotated lat/lon and gaussian grids in latlons().
+
+version 1.0b1 - svn revision 91
+===============================
+* basic write support through __setitem__ (to modify an existing grib
+  message) and tostring (to get the encoded binary string that can
+  be written to a file).  This allows modifications to an existing grib
+  message, but not the creation of a new grib message from scratch.
+
+version 1.0a1 - svn revision 55
+===============================
+* initial release.  Support for reading GRIB1 and GRIB2 is nearly complete.
+  No support for writing yet.
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..af7fa1d
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,59 @@
+Source: pygrib
+Section: python
+Priority: optional
+Maintainer: Alastair McKinstry <mckinstry at debian.org>
+Build-Depends: debhelper (>= 9), 
+ python-all-dev (>=2.6.6-3~), 
+ libgrib-api-dev, libgrib2c-dev, 
+ python-numpy (>= 1:1.6.1) , 
+ libjasper-dev, libpng-dev, python3-all-dev, python3-numpy, dh-python
+Standards-Version: 3.9.6
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
+Homepage: https://code.google.com/p/pygrib/
+
+Package: python-grib
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+ ${python:Depends}, python-numpy, python-pyproj,
+ libgrib-api-dev, libgrib2c-dev,libjasper-dev, libpng-dev, libjasper-dev
+Provides: ${python:Provides}
+Recommends: python-grib-doc
+Description:  Python module for reading and writing GRIB files
+ Python module for reading and writing GRIB (editions 1 and 2) files.
+ GRIB is the World Meterological Organization standard for
+ distributing gridded data. The module is a Python interface
+ to the GRIB API C library from the 
+ European Centre for Medium-Range Weather Forecasts (ECMWF).
+
+Package: python3-grib
+Recommends: python-grib-doc
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+ ${python3:Depends}, python3-numpy, python3-pyproj,
+ libgrib-api-dev, libgrib2c-dev,libjasper-dev, libpng-dev, libjasper-dev
+Breaks: python-grib (<< 1.9.6-3~)
+Replaces: python-grib (<< 1.9.6-3~)
+Description:  Python 3 module for reading and writing GRIB files
+ Python 3 module for reading and writing GRIB (editions 1 and 2) files.
+ GRIB is the World Meterological Organization standard for
+ distributing gridded data. The module is a Python 3 interface
+ to the GRIB API C library from the
+ European Centre for Medium-Range Weather Forecasts (ECMWF).
+ .
+ This package also contains the cnvgrib1to2, grib_list, grib_repack, and
+ cnvgrib2to1 scripts.
+
+Package: python-grib-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Breaks: python-grib (<< 1.9.6-3~)
+Replaces: python-grib (<< 1.9.6-3~)
+Description:  Documentation and examples for Python GRIB
+ Python module for reading and writing GRIB (editions 1 and 2) files.
+ GRIB is the World Meterological Organization standard for
+ distributing gridded data. The module is a Python interface
+ to the GRIB API C library from the
+ European Centre for Medium-Range Weather Forecasts (ECMWF).
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..83bb399
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,20 @@
+copyright: copyright 2010 by Jeffrey Whitaker.
+
+python-grib was packaged for Debian by Alastair McKinstry <mckinstry at debian.org>
+April 18, 2012. 
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation.
+
+THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+
diff --git a/debian/man/cnvgrib1to2.1 b/debian/man/cnvgrib1to2.1
new file mode 100644
index 0000000..333912d
--- /dev/null
+++ b/debian/man/cnvgrib1to2.1
@@ -0,0 +1,39 @@
+.TH cnvgrib1to2 1 "2012-04-18" "python-grib"
+.SH NAME
+.B cnvgrib1to2 \- Convert a GRIB1 file to GRIB2 format
+
+.SH SYNOPSIS
+.B cnvgrib1tos21 
+.I <grib2filename> 
+.I <grib1filename>
+.I [packing_scheme]
+
+.SH DESCRIPTION
+
+Convert a GRIB1 format file to GRIB2 format. 
+
+GRIB is a file format defined for meteorological data defined by
+the WMO (World Meteorological Organisation).
+
+.SH OPTIONS
+This program takes an optional 
+.I packing_scheme
+which may be one of:
+.TP 5
+\fBgrid_simple\fP
+.TP 5
+\fBgrid_complex\fP
+.TP 5
+\fBgrid_complex_spatial_differencing\fP
+.TP 5
+\fBgrid_jpeg\fP
+.TP 5
+\fBgrid_png\fP
+.P
+The default is 
+.I 'grid_jpeg'
+
+.SH AUTHORS
+Jeffrey Whittaker <jeffrey.s.whitaker at noaa.gov> wrote the code.
+.br
+Alastair McKinstry <mckinstry at debian.org> wrote this man page
diff --git a/debian/man/cnvgrib2to1.1 b/debian/man/cnvgrib2to1.1
new file mode 100644
index 0000000..dfb2f0e
--- /dev/null
+++ b/debian/man/cnvgrib2to1.1
@@ -0,0 +1,21 @@
+.TH cnvgrib2to1 1 "2012-04-18" "python-grib"
+.SH NAME
+.B cnvgrib2to1 \- Convert a GRIB2 file to GRIB1 format
+
+.SH SYNOPSIS
+.B cnvgrib2to1 
+.I <grib2filename> 
+.I <grib1filename>
+
+.SH DESCRIPTION
+
+Convert a GRIB2 format file to a GRIB1 format. 
+
+GRIB is a file format defined for meteorological data defined by
+the WMO (World Meteorological Organisation).
+
+
+.SH AUTHORS
+Jeffrey Whittaker <jeffrey.s.whitaker at noaa.gov> wrote the code.
+.br
+Alastair McKinstry <mckinstry at debian.org> wrote this man page
diff --git a/debian/man/grib_list.1 b/debian/man/grib_list.1
new file mode 100644
index 0000000..58ef420
--- /dev/null
+++ b/debian/man/grib_list.1
@@ -0,0 +1,23 @@
+.TH grib_list 1 "2012-04-18" "python-grib"
+.SH NAME
+.B grib_list \- List the contents of a GRIB or GRIB2 file
+
+.SH SYNOPSIS
+.B grib_list
+.I [-s] gribfile
+
+.SH DESCRIPTION
+
+This command (from the python-grib, or pygrib package) lists the contents
+of a GRIB1 or GRIB2 (meteorological data) file.
+
+.SH OPTIONS
+.TP 5
+\fB-s\fP
+Give a short, rather than long, form of the listing.
+
+.SH AUTHORS
+Jeffrey Whittaker <jeffrey.s.whitaker at noaa.gov> wrote the code.
+.br
+Alastair McKinstry <mckinstry at debian.org> wrote this man page.
+
diff --git a/debian/man/grib_repack.1 b/debian/man/grib_repack.1
new file mode 100644
index 0000000..6466f18
--- /dev/null
+++ b/debian/man/grib_repack.1
@@ -0,0 +1,49 @@
+.TH grib_repack 1 "2012-04-18" "Debian Science"
+.SH NAME
+.B grib_repack \- change the packing scheme in a GRIB2 file
+
+.SH SYNOPSIS
+.B grib_repack 
+.I [options] grib2filein grib2fileout
+.PP
+.B grib -h 
+.PP
+for help
+
+.SH DESCRIPTION
+repack the data in 
+.I grib2filein
+with a different packing scheme.
+
+.SH OPTIONS
+.TP 5
+\fB-h\fP 
+Give help
+.TP 5
+\fB-pN\fP
+Desired packing type, where 
+.I N 
+is:
+.TP
+\fB0\fP for simple packing
+.TP
+\fB1\fP for simple matrix packing
+.TP
+\fB2\fP for complex packing
+.TP
+\fB3\fP for complex packing with spatial differencing
+.TP
+\fB4\fP for no packing (ieee)
+.TP
+\fB40\fP for JPEG2000 packing
+.TP
+\fB41\fP for PNG packing
+.TP
+\fB61\fP for simple log pre-processing
+
+.SH AUTHORS
+Jeffrey Whittaker <jeffrey.s.whitaker at noaa.gov> wrote the code.
+.br
+Alastair McKinstry <mckinstry at debian.org> wrote this man page.
+
+
diff --git a/debian/patches/packed-4bytes.patch b/debian/patches/packed-4bytes.patch
new file mode 100644
index 0000000..05d0ee9
--- /dev/null
+++ b/debian/patches/packed-4bytes.patch
@@ -0,0 +1,32 @@
+Origin: https://bugs.launchpad.net/ubuntu/+source/pygrib/+bug/1308040
+Description:  Fix for segfault on 4-byte DRTs
+Last-Updated:  2014-10-19
+Forwarded: no
+
+Index: pygrib-1.9.9/g2clib.pyx
+===================================================================
+--- pygrib-1.9.9.orig/g2clib.pyx
++++ pygrib-1.9.9/g2clib.pyx
+@@ -24,11 +24,11 @@ cdef extern from "stdlib.h":
+ 
+ # get 32 bit integer type
+ cdef extern from "inttypes.h":
+-    ctypedef long int32_t
++    ctypedef int int32_t
+ 
+ # Functions from grib2c lib.
+ cdef extern from "grib2.h":
+-    ctypedef int32_t g2int # for 64 bit machines, this should be int
++    ctypedef int32_t g2int
+     ctypedef float g2float
+     g2int g2_unpack1(unsigned char *,g2int *,g2int **,g2int *)
+     g2int g2_unpack3(unsigned char *,g2int *,g2int **,g2int **, 
+@@ -731,7 +731,7 @@ def grib2_addfield(gribmsg,pdsnum,object
+         bmap  = <g2int *>bitmapdat
+     else:
+         bmap = NULL
+-    gribmsg = gribmsg + 4*(len(drstmpl)+ngrdpts+4)*b" "
++    gribmsg = gribmsg + 4*(len(drstmpl)+ngrdpts++len(pdstmpl))*b" "
+     cgrib = <unsigned char *>PyBytes_AsString(gribmsg)
+     ierr = g2_addfield(cgrib,ipdsnum,ipdstmpl,fcoordlist,numcoord,idrsnum,idrstmpl,fld,ngrdpts,ibmap,bmap)
+     if ierr < 0:
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e8c3bd7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+use_g2clib.patch
+packed-4bytes.patch
diff --git a/debian/patches/use_g2clib.patch b/debian/patches/use_g2clib.patch
new file mode 100644
index 0000000..3b7c3ef
--- /dev/null
+++ b/debian/patches/use_g2clib.patch
@@ -0,0 +1,79 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: On Debian, use libgrib2c library rather than embedded version.
+Forwarded: not-needed
+Last-Updated: 2013-11-28
+
+Index: pygrib-1.9.8/setup.py
+===================================================================
+--- pygrib-1.9.8.orig/setup.py	2013-11-28 16:43:15.000000000 +0000
++++ pygrib-1.9.8/setup.py	2013-11-28 16:45:08.000000000 +0000
+@@ -20,6 +20,9 @@
+ openjpeg_dir = os.environ.get('OPENJPEG_DIR')
+ openjpeg_libdir = os.environ.get('OPENJPEG_LIBDIR')
+ openjpeg_incdir = os.environ.get('OPENJPEG_INCDIR')
++g2clib_dir = os.environ.get('G2CLIB_DIR')
++g2clib_libdir = os.environ.get('G2CLIB_LIBDIR')
++g2clib_incdir = os.environ.get('G2CLIB_INCDIR')
+ # where to install man pages?
+ man_dir = os.environ.get('MAN_DIR')
+ 
+@@ -61,10 +64,17 @@
+     except: pass
+     try: man_dir = config.get("directories", "man_dir")
+     except: pass
++    try: g2clib_dir = config.get("directories", "g2clib_dir")
++    except: pass
++    try: g2clib_libdir = config.get("directories", "g2clib_libdir")
++    except: pass
++    try: g2clib_incdir = config.get("directories", "g2clib_incdir")
++    except: pass
+ 
+ libdirs=[]
+ incdirs=[numpy.get_include()]
+-libraries=['grib_api']
++libraries=['grib_api','grib2c']
++macros=[]
+ 
+ if grib_api_libdir is None and grib_api_dir is not None:
+     libdirs.append(os.path.join(grib_api_dir,'lib'))
+@@ -105,31 +115,21 @@
+ if zlib_incdir is None and zlib_dir is not None:
+     incdirs.append(os.path.join(zlib_dir,'include'))
+ 
+-g2clib_deps = glob.glob('g2clib_src/*.c')
+-g2clib_deps.append('g2clib.c')
+-incdirs.append("g2clib_src")
+-macros=[]
+-
+-# if jasper or openjpeg lib not available...
+-if 'jasper' not in libraries and 'openjpeg' not in libraries:
+-    g2clib_deps.remove('g2clib_src/jpcpack.c')
+-    g2clib_deps.remove('g2clib_src/jpcunpack.c')
+-else:
+-    macros.append(('USE_JPEG2000',1))
+-# if png lib not available...
+-if 'png' not in libraries:
+-    g2clib_deps.remove('g2clib_src/pngpack.c')
+-    g2clib_deps.remove('g2clib_src/pngunpack.c')
+-else:
+-    macros.append(('USE_PNG',1))
++if g2clib_dir is not None or g2clib_libdir is not None:
++    libraries.append("g2clib")
++if g2clib_libdir is None and g2clib_dir is not None:
++    libdirs.append(os.path.join(g2clib_dir,'lib'))
++    libdirs.append(os.path.join(g2clib_dir,'lib64'))
++if g2clib_incdir is None and g2clib_dir is not None:
++    incdirs.append(os.path.join(g2clib_dir,'include'))
+ 
+ if hasattr(sys,'maxsize'):
+     if sys.maxsize > 2**31-1: macros.append(('__64BIT__',1))
+ else:
+     if sys.maxint > 2**31-1: macros.append(('__64BIT__',1))
+ 
+-g2clibext = Extension("g2clib",g2clib_deps,include_dirs=incdirs,\
+-            library_dirs=libdirs,libraries=libraries,runtime_library_dirs=libdirs,define_macros=macros)
++g2clibext =\
++Extension("g2clib",["g2clib.c"],include_dirs=incdirs,library_dirs=libdirs,libraries=libraries)
+ redtoregext =\
+ Extension("redtoreg",["redtoreg.c"],include_dirs=[numpy.get_include()])
+ pygribext =\
diff --git a/debian/python-grib-doc.docs b/debian/python-grib-doc.docs
new file mode 100644
index 0000000..a48392e
--- /dev/null
+++ b/debian/python-grib-doc.docs
@@ -0,0 +1,2 @@
+docs/*
+ncepgrib2_docs/*
diff --git a/debian/python-grib-doc.examples b/debian/python-grib-doc.examples
new file mode 100644
index 0000000..c6f8e7a
--- /dev/null
+++ b/debian/python-grib-doc.examples
@@ -0,0 +1 @@
+sampledata/*
diff --git a/debian/python-grib-doc.manpages b/debian/python-grib-doc.manpages
new file mode 100644
index 0000000..19f429f
--- /dev/null
+++ b/debian/python-grib-doc.manpages
@@ -0,0 +1 @@
+debian/man/*
diff --git a/debian/python-grib.install b/debian/python-grib.install
new file mode 100644
index 0000000..5c87a15
--- /dev/null
+++ b/debian/python-grib.install
@@ -0,0 +1 @@
+usr/lib/python2*/dist-packages/*
diff --git a/debian/python3-grib.install b/debian/python3-grib.install
new file mode 100644
index 0000000..8a96c9f
--- /dev/null
+++ b/debian/python3-grib.install
@@ -0,0 +1,2 @@
+usr/lib/python3*/dist-packages/*
+usr/bin/*
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..69c8931
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,26 @@
+#!/usr/bin/make -f
+
+# export DH_VERBOSE=1
+
+# The magic debhelper  rule
+%:
+	dh $@  --with python2,python3 --buildsystem=pybuild
+
+
+override_dh_auto_build: 
+	dh_auto_build
+
+install-python%:
+	python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
+
+#override_dh_auto_install: $(PYTHON3:%=install-python%)
+override_dh_auto_install: 
+	dh_auto_install
+	dh_installchangelogs debian/changelog.upstream
+	dh_numpy
+	dh_numpy3
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf build
+	rm -rf *.egg-info
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..16633e3
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+http://code.google.com/p/pygrib/downloads/list?can=1 \
+.*/pygrib-(\d[\d\.]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))|zip)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pygrib.git



More information about the debian-science-commits mailing list