[eccodes] 70/106: Minor fixes to gribapi.py for python3

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 09:05:20 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository eccodes.

commit 41cd1c282ad7ef5b9d7483145d8aaaed94b5ad3e
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Tue Dec 6 10:45:10 2016 +0000

    Minor fixes to gribapi.py for python3
---
 debian/changelog             |  5 +++--
 debian/patches/python3.patch | 23 +++++++++++++++++++----
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e86f4b0..8a7054a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-eccodes (2.0.2-3) UNRELEASED; urgency=medium
+eccodes (2.0.2-3) unstable; urgency=medium
 
   * Add Breaks/Replaces python3-eccodes / python3-gribapi
+  * Minor fixes to gribapi.py for python3
 
- -- Alastair McKinstry <mckinstry at debian.org>  Fri, 02 Dec 2016 16:38:06 +0000
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 06 Dec 2016 10:45:03 +0000
 
 eccodes (2.0.2-2) unstable; urgency=medium
 
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index d3b98b4..53409cb 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -1,7 +1,7 @@
 Author: Alastair McKinstry <mckinstry at debian.org>
 Description: Support for Python3
 Forwarded: no
-Last-Updated: 2016-04-30
+Last-Updated: 2016-12-05
 
 Index: eccodes-2.0.2/python/test_iterator.py
 ===================================================================
@@ -419,12 +419,27 @@ Index: eccodes-2.0.2/python/gribapi/gribapi.py
 ===================================================================
 --- eccodes-2.0.2.orig/python/gribapi/gribapi.py
 +++ eccodes-2.0.2/python/gribapi/gribapi.py
-@@ -22,7 +22,7 @@ When this is enabed, then the system Pyt
+@@ -22,14 +22,21 @@ When this is enabed, then the system Pyt
      - NumPy
  
  """
 -import gribapi_swig as _internal
-+from . import gribapi_swig as _internal
- # from gribapi import gribapi_swig as _internal
+-# from gribapi import gribapi_swig as _internal
++from gribapi import gribapi_swig as _internal
  import types
  import sys
+ import os
+ from functools import wraps
+ # import inspect
+ 
++try:
++    type(file)
++except NameError:
++    # python3
++    import io
++    file=io.IOBase
++    long=int
++
+ KEYTYPES = {
+     1: int,
+     2: float,

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



More information about the debian-science-commits mailing list