[Git][debian-gis-team/pyresample][master] 2 commits: Fix compatibility with PyProj >= 3.0

Antonio Valentino gitlab at salsa.debian.org
Sun Nov 8 10:22:46 GMT 2020



Antonio Valentino pushed to branch master at Debian GIS Project / pyresample


Commits:
af1524a4 by Antonio Valentino at 2020-11-08T10:09:22+00:00
Fix compatibility with PyProj >= 3.0

- - - - -
9c07ae76 by Antonio Valentino at 2020-11-08T10:09:53+00:00
Set distribution to unstable

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0005-pyproj3-compat.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+pyresample (1.16.0+ds-3) unstable; urgency=medium
+
+  * debian/patches:
+    - new 0005-pyproj3-compat.patch to fix compatibility with PyProj >= 3.0.
+      See also https://github.com/pytroll/pyresample/pull/311.
+      Closes: #973867, #973868.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Sun, 08 Nov 2020 10:09:34 +0000
+
 pyresample (1.16.0+ds-2) unstable; urgency=medium
 
   * debian/control:


=====================================
debian/patches/0005-pyproj3-compat.patch
=====================================
@@ -0,0 +1,41 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 8 Nov 2020 10:05:41 +0000
+Subject: pyproj3-compat
+
+Fix compatibility with PyProj >= 3.0
+
+Forwarded: https://github.com/pytroll/pyresample/pull/311
+---
+ pyresample/ewa/_ll2cr.pyx | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/pyresample/ewa/_ll2cr.pyx b/pyresample/ewa/_ll2cr.pyx
+index 4492c3e..987849c 100644
+--- a/pyresample/ewa/_ll2cr.pyx
++++ b/pyresample/ewa/_ll2cr.pyx
+@@ -26,8 +26,14 @@ __docformat__ = "restructuredtext en"
+ try:
+     from pyproj._proj import _Proj
+ except ImportError:
+-    # backward compatibility with PyProj < v2.6
+-    from pyproj._proj import Proj as _Proj
++    try:
++        # backward compatibility with PyProj < v2.6
++        from pyproj._proj import Proj as _Proj
++    except ImportError:
++        # PyProj >= 3.0
++        # use public API
++        _Proj = None
++
+ import numpy
+ cimport cython
+ from cpython cimport bool
+@@ -54,7 +60,7 @@ class MyProj(BaseProj):
+     def __call__(self, lons, lats, **kwargs):
+         if self.is_latlong():
+             return lons, lats
+-        elif isinstance(lons, numpy.ndarray):
++        elif isinstance(lons, numpy.ndarray) and _Proj is not None:
+             # Because we are doing this we know that we are getting a double array
+             inverse = kwargs.get('inverse', False)
+             errcheck = kwargs.get('errcheck', False)


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@
 0002-Skip-test-on-deprecatet-basemap.patch
 0003-Projection-names-compatibility.patch
 0004-Install-test-data.patch
+0005-pyproj3-compat.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/-/compare/f1a46025f8f84298f1fef4a0474e481380061b8d...9c07ae7695441a0dcf97074d82fce84a93202303

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/-/compare/f1a46025f8f84298f1fef4a0474e481380061b8d...9c07ae7695441a0dcf97074d82fce84a93202303
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20201108/de5c1d03/attachment-0001.html>


More information about the Pkg-grass-devel mailing list