[rasterio] 03/07: Fix patches, drop patches included upstream

Johan Van de Wauw johanvdw-guest at moszumanska.debian.org
Sun Aug 16 19:47:06 UTC 2015


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

johanvdw-guest pushed a commit to branch master
in repository rasterio.

commit 90af314936367ea23a5bce3bf06cb1cbf9249ac9
Author: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date:   Wed Jul 22 21:43:02 2015 +0200

    Fix patches, drop patches included upstream
---
 ...0001-Rename-rio-to-rasterio-Closes-788463.patch | 12 ++--
 .../0002-Fix-compatibility-with-Cython-0.22.patch  | 65 ----------------------
 .../0003-Fix-compatibility-with-numpy-1.9.patch    | 22 --------
 debian/patches/series                              |  2 -
 4 files changed, 5 insertions(+), 96 deletions(-)

diff --git a/debian/patches/0001-Rename-rio-to-rasterio-Closes-788463.patch b/debian/patches/0001-Rename-rio-to-rasterio-Closes-788463.patch
index abcc7d5..dfded36 100644
--- a/debian/patches/0001-Rename-rio-to-rasterio-Closes-788463.patch
+++ b/debian/patches/0001-Rename-rio-to-rasterio-Closes-788463.patch
@@ -7,16 +7,14 @@ There is already another package providing a binary "rio".
  setup.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/setup.py b/setup.py
-index 7bed441..2b92228 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -224,7 +224,7 @@ setup_args = dict(
+@@ -229,7 +229,7 @@ setup_args = dict(
      packages=['rasterio', 'rasterio.rio'],
      entry_points='''
          [console_scripts]
--        rio=rasterio.rio.main:cli
-+        rasterio=rasterio.rio.main:cli
-         
+-        rio=rasterio.rio.main:main_group
++        rasterio=rasterio.rio.main:main_group
+ 
          [rasterio.rio_commands]
-         bounds=rasterio.rio.rio:bounds
+         bounds=rasterio.rio.features:bounds
diff --git a/debian/patches/0002-Fix-compatibility-with-Cython-0.22.patch b/debian/patches/0002-Fix-compatibility-with-Cython-0.22.patch
deleted file mode 100644
index 3d4025d..0000000
--- a/debian/patches/0002-Fix-compatibility-with-Cython-0.22.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From: Johan Van de Wauw <johan.vandewauw at gmail.com>
-Date: Tue, 2 Jun 2015 19:38:30 +0200
-Subject: Fix compatibility with Cython 0.22
-
-Completely based on the work by brendan-ward for rasterio
-https://github.com/mapbox/rasterio/pull/373/files
-
-Changes are needed to build on debian unstable
-index 1ff29cf..2bf2cc1 100644
----
- rasterio/_features.pxd | 20 ++++++++++----------
- rasterio/_io.pyx       | 11 ++++++++++-
- 2 files changed, 20 insertions(+), 11 deletions(-)
-
-diff --git a/rasterio/_features.pxd b/rasterio/_features.pxd
-index 9ffcacd..e4898ae 100644
---- a/rasterio/_features.pxd
-+++ b/rasterio/_features.pxd
-@@ -16,14 +16,14 @@ cdef class GeomBuilder:
- 
- 
- cdef class OGRGeomBuilder:
--    cdef void * _createOgrGeometry(self, int geom_type)
-+    cdef void * _createOgrGeometry(self, int geom_type) except NULL
-     cdef _addPointToGeometry(self, void *cogr_geometry, object coordinate)
--    cdef void * _buildPoint(self, object coordinates)
--    cdef void * _buildLineString(self, object coordinates)
--    cdef void * _buildLinearRing(self, object coordinates)
--    cdef void * _buildPolygon(self, object coordinates)
--    cdef void * _buildMultiPoint(self, object coordinates)
--    cdef void * _buildMultiLineString(self, object coordinates)
--    cdef void * _buildMultiPolygon(self, object coordinates)
--    cdef void * _buildGeometryCollection(self, object coordinates)
--    cdef void * build(self, object geom)
-+    cdef void * _buildPoint(self, object coordinates) except NULL
-+    cdef void * _buildLineString(self, object coordinates) except NULL
-+    cdef void * _buildLinearRing(self, object coordinates) except NULL
-+    cdef void * _buildPolygon(self, object coordinates) except NULL
-+    cdef void * _buildMultiPoint(self, object coordinates) except NULL
-+    cdef void * _buildMultiLineString(self, object coordinates) except NULL
-+    cdef void * _buildMultiPolygon(self, object coordinates) except NULL
-+    cdef void * _buildGeometryCollection(self, object coordinates) except NULL
-+    cdef void * build(self, object geom) except NULL
-diff --git a/rasterio/_io.pyx b/rasterio/_io.pyx
-index 64ef9ec..75f1697 100644
---- a/rasterio/_io.pyx
-+++ b/rasterio/_io.pyx
-@@ -38,7 +38,16 @@ log.addHandler(NullHandler())
- cdef bint in_dtype_range(value, dtype):
-     """Returns True if value is in the range of dtype, else False."""
-     infos = {
--            'c': np.finfo, 'f': np.finfo, 'i': np.iinfo, 'u': np.iinfo}
-+        'c': np.finfo,
-+        'f': np.finfo,
-+        'i': np.iinfo,
-+        'u': np.iinfo,
-+        # Cython 0.22 returns dtype.kind as an int and will not cast to a char
-+        99: np.finfo,
-+        102: np.finfo,
-+        105: np.iinfo,
-+        117: np.iinfo
-+    }
-     rng = infos[np.dtype(dtype).kind](dtype)
-     return rng.min <= value <= rng.max
- 
diff --git a/debian/patches/0003-Fix-compatibility-with-numpy-1.9.patch b/debian/patches/0003-Fix-compatibility-with-numpy-1.9.patch
deleted file mode 100644
index 950a67e..0000000
--- a/debian/patches/0003-Fix-compatibility-with-numpy-1.9.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Johan Van de Wauw <johan.vandewauw at gmail.com>
-Date: Mon, 29 Jun 2015 23:37:23 +0200
-Subject: Fix compatibility with numpy <1.9
-
----
- rasterio/rio/calc.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/rasterio/rio/calc.py b/rasterio/rio/calc.py
-index 9a8c4bb..5af4d7c 100644
---- a/rasterio/rio/calc.py
-+++ b/rasterio/rio/calc.py
-@@ -122,6 +122,9 @@ def calc(ctx, command, files, output, name, dtype, masked):
- 
-             res = snuggs.eval(command, **ctxkwds)
- 
-+            if type(res) is np.ma.core.MaskedArray:
-+                res = res.filled(kwargs['nodata'])
-+
-             if len(res.shape) == 3:
-                 results = np.ndarray.astype(res, dtype, copy=False)
-             else:
diff --git a/debian/patches/series b/debian/patches/series
index 3c98fe7..9654eb2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
 0001-Rename-rio-to-rasterio-Closes-788463.patch
-0002-Fix-compatibility-with-Cython-0.22.patch
-0003-Fix-compatibility-with-numpy-1.9.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/rasterio.git



More information about the Pkg-grass-devel mailing list