[rasterio] 01/03: Add _io.pyx changes to Cython patch
Johan Van de Wauw
johanvdw-guest at moszumanska.debian.org
Mon Jun 15 16:13:18 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 769337c80dfc9ef8cc586446f8a2fb4474c92dba
Author: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date: Mon Jun 15 14:49:25 2015 +0200
Add _io.pyx changes to Cython patch
---
... 0002-Fix-compatibility-with-Cython-0.22.patch} | 34 ++++++++++++++++++++--
debian/patches/series | 2 +-
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/debian/patches/0003-Fix-compatibility-with-Cython-0.22.patch b/debian/patches/0002-Fix-compatibility-with-Cython-0.22.patch
similarity index 61%
rename from debian/patches/0003-Fix-compatibility-with-Cython-0.22.patch
rename to debian/patches/0002-Fix-compatibility-with-Cython-0.22.patch
index 7df8958..3d4025d 100644
--- a/debian/patches/0003-Fix-compatibility-with-Cython-0.22.patch
+++ b/debian/patches/0002-Fix-compatibility-with-Cython-0.22.patch
@@ -1,16 +1,22 @@
-From a1cea1c28631a27de40bbdf51bccc4fcd87ba42d Mon Sep 17 00:00:00 2001
From: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date: Tue, 2 Jun 2015 19:38:30 +0200
-Subject: [PATCH] Fix compatibility with Cython 0.22
+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 @@
+@@ -16,14 +16,14 @@ cdef class GeomBuilder:
cdef class OGRGeomBuilder:
@@ -35,3 +41,25 @@ index 1ff29cf..2bf2cc1 100644
+ 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/series b/debian/patches/series
index faa2369..e97ee88 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,2 @@
0001-Rename-rio-to-rasterio-Closes-788463.patch
-0003-Fix-compatibility-with-Cython-0.22.patch
+0002-Fix-compatibility-with-Cython-0.22.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