[Git][debian-gis-team/pycoast][master] Add patch to support pyshp 2.0.0.
Bas Couwenberg
gitlab at salsa.debian.org
Mon Nov 5 14:49:43 GMT 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / pycoast
Commits:
cfdacb1a by Bas Couwenberg at 2018-11-05T14:49:32Z
Add patch to support pyshp 2.0.0.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/pyshp-2.0.0.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -2,6 +2,7 @@ pycoast (1.0.0+dfsg-5) UNRELEASED; urgency=medium
* Bump Standards-Version to 4.2.1, no changes.
* Update watch file to limit matches to archive path.
+ * Add patch to support pyshp 2.0.0.
-- Bas Couwenberg <sebastic at debian.org> Sun, 05 Aug 2018 20:46:24 +0200
=====================================
debian/patches/pyshp-2.0.0.patch
=====================================
@@ -0,0 +1,34 @@
+Description: Use a tempfile for the dummy shape objects.
+ Required for pyshp >= 2.0.0.
+Author: Bas Couwenberg <sebastic at debian.org>
+Bug: https://github.com/pytroll/pycoast/issues/17
+Forwarded: https://github.com/pytroll/pycoast/pull/18
+
+--- a/pycoast/cw_base.py
++++ b/pycoast/cw_base.py
+@@ -24,6 +24,7 @@
+
+ import os
+ import shapefile
++import tempfile
+ import numpy as np
+ from PIL import Image, ImageFont
+ import pyproj
+@@ -252,7 +253,8 @@ class ContourWriterBase(object):
+ lin_lons = np.arange(lon_min, lon_max + Dlon / 5.0, Dlon / 10.0)
+
+ # create dummpy shape object
+- tmpshape = shapefile.Writer("")
++ tmpfile = tempfile.mkstemp()[1]
++ tmpshape = shapefile.Writer(tmpfile)
+
+ # MINOR LINES ######
+ if not kwargs['minor_is_tick']:
+@@ -449,6 +451,7 @@ class ContourWriterBase(object):
+ self._draw_line(draw,
+ index_array.flatten().tolist(),
+ **kwargs)
++ os.unlink(tmpfile)
+ self._finalize(draw)
+
+ def _find_bounding_box(self, xys):
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
0001-Skip-tests-that-use-shapes.patch
+pyshp-2.0.0.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/pycoast/commit/cfdacb1ab62d2f3d93f0c5f653dd3ac5fc9c9983
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pycoast/commit/cfdacb1ab62d2f3d93f0c5f653dd3ac5fc9c9983
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/20181105/c80e1ba3/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list