Package: gdal / 2.1.2+dfsg-5

python3-import-gdal_array.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Python bindings: fix 'import osgeo.gdal_array' with python3 and SWIG 3.0.10
Author: Even Rouault
Origin: https://trac.osgeo.org/gdal/changeset/37277
Bug: https://trac.osgeo.org/gdal/ticket/6801
Bug-Debian: https://bugs.debian.org/853900

--- a/swig/include/gdal_array.i
+++ b/swig/include/gdal_array.i
@@ -994,7 +994,7 @@ retStringAndCPLFree* GetArrayFilename(Py
 
 %pythoncode %{
 import numpy
-import _gdal_array
+from . import _gdal_array
 
 import gdalconst
 import gdal
--- a/swig/python/osgeo/gdal_array.py
+++ b/swig/python/osgeo/gdal_array.py
@@ -145,7 +145,7 @@ def RATValuesIONumPyRead(*args, **kwargs
   return _gdal_array.RATValuesIONumPyRead(*args, **kwargs)
 RATValuesIONumPyRead = _gdal_array.RATValuesIONumPyRead
 import numpy
-import _gdal_array
+from . import _gdal_array
 
 import gdalconst
 import gdal