[Git][debian-gis-team/pycoast][master] 3 commits: New 0006-Compatibility-with-Pillow-10.patch
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Jul 8 17:35:42 BST 2023
Antonio Valentino pushed to branch master at Debian GIS Project / pycoast
Commits:
6e3fde53 by Antonio Valentino at 2023-07-08T16:27:05+00:00
New 0006-Compatibility-with-Pillow-10.patch
- - - - -
d3ec5fed by Antonio Valentino at 2023-07-08T16:31:55+00:00
Fix cme warnings
- - - - -
6e836d79 by Antonio Valentino at 2023-07-08T16:32:14+00:00
Set distribution to unstable
- - - - -
6 changed files:
- debian/changelog
- debian/control
- + debian/patches/0006-Compatibility-with-Pillow-10.patch
- debian/patches/series
- debian/rules
- debian/tests/python3
Changes:
=====================================
debian/changelog
=====================================
@@ -1,10 +1,16 @@
-pycoast (1.6.1+dfsg-3) UNRELEASED; urgency=medium
+pycoast (1.6.1+dfsg-3) unstable; urgency=medium
- * Team upload.
+ [ Bas Couwenberg ]
* Bump Standards-Version to 4.6.2, no changes.
* Bump debhelper compat to 13.
- -- Bas Couwenberg <sebastic at debian.org> Wed, 18 Jan 2023 17:08:34 +0100
+ [ Antonio Valentino ]
+ * debian/control:
+ - fix lintian warnings (break/replaces too old versions).
+ * debian/patches:
+ - new 0006-Compatibility-with-Pillow-10.patch (Closes: #1040634).
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 08 Jul 2023 16:32:00 +0000
pycoast (1.6.1+dfsg-2) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -3,7 +3,6 @@ Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Uploaders: Antonio Valentino <antonio.valentino at tiscali.it>
Section: python
Testsuite: autopkgtest-pkg-python
-Rules-Requires-Root: no
Priority: optional
Build-Depends: debhelper-compat (= 13),
dh-python,
@@ -25,6 +24,7 @@ Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/debian-gis-team/pycoast
Vcs-Git: https://salsa.debian.org/debian-gis-team/pycoast.git
Homepage: https://github.com/pytroll/pycoast
+Rules-Requires-Root: no
Package: python3-pycoast
Architecture: all
@@ -47,13 +47,11 @@ Description: Draw coastlines, borders and rivers on images (for Python 3)
Package: python-pycoast-doc
Architecture: all
-Section: doc
Multi-Arch: foreign
+Section: doc
Depends: ${sphinxdoc:Depends},
${misc:Depends}
Suggests: www-browser
-Breaks: python-pycoast (<< 1.2.2+dfsg-2~)
-Replaces: python-pycoast (<< 1.2.2+dfsg-2~)
Description: Draw coastlines, borders and rivers on images (common documentation)
Pycoast is a Python package to add coastlines, borders and rivers to
raster images using data from the GSHHG (previously known as GSHHS)
=====================================
debian/patches/0006-Compatibility-with-Pillow-10.patch
=====================================
@@ -0,0 +1,44 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 8 Jul 2023 16:21:54 +0000
+Subject: Compatibility with Pillow 10
+
+Forwarded: https://github.com/pytroll/pycoast/issues/107, https://github.com/pytroll/pycoast/pull/108
+---
+ pycoast/cw_agg.py | 6 +++++-
+ pycoast/cw_base.py | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/pycoast/cw_agg.py b/pycoast/cw_agg.py
+index 3de81cf..2cd75d7 100644
+--- a/pycoast/cw_agg.py
++++ b/pycoast/cw_agg.py
+@@ -91,7 +91,11 @@ class ContourWriterAGG(ContourWriterBase):
+ ):
+ """Add a text box at position (x,y)."""
+ if box_outline is not None:
+- text_size = draw.textsize(text, font)
++ if hasattr(draw, "textsize"):
++ text_size = draw.textsize(text, font)
++ else:
++ left, top, right, bottom = draw.textbbox(text_position, text, font)
++ text_size = right - left, top - bottom
+ margin = 2
+ xUL = text_position[0] - margin
+ yUL = text_position[1]
+diff --git a/pycoast/cw_base.py b/pycoast/cw_base.py
+index a1e54f2..1f384ac 100644
+--- a/pycoast/cw_base.py
++++ b/pycoast/cw_base.py
+@@ -167,7 +167,11 @@ class ContourWriterBase(object):
+
+ def _draw_text(self, draw, position, txt, font, align="cc", **kwargs):
+ """Draw text with agg module."""
+- txt_width, txt_height = draw.textsize(txt, font)
++ if hasattr(draw, "textsize"):
++ txt_width, txt_height = draw.textsize(txt, font)
++ else:
++ left, top, right, bottom = draw.textbbox(position, txt, font)
++ txt_width, txt_height = right - left, top - bottom
+ x_pos, y_pos = position
+ ax, ay = align.lower()
+ if ax == "r":
=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@
0003-Fix-sphinx-build.patch
0004-Remove-versioneer-from-pyproject.toml.patch
0005-Relax-tolerance-for-pillow-9.4.patch
+0006-Compatibility-with-Pillow-10.patch
=====================================
debian/rules
=====================================
@@ -8,20 +8,22 @@ export PYTHONPATH=$(CURDIR)
export PYBUILD_NAME=pycoast
export PYBUILD_BEFORE_TEST=cp -r {dir}/pycoast/tests/* {build_dir}/pycoast/tests
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/pycoast/tests {build_dir}/*.png
-export PYBUILD_TEST_ARGS=$(CURDIR)/pycoast/tests \
--k "not test_add_points_pil and not test_config_file_points_and_borders_pil \
-and not test_add_shapefiles_from_dict_agg \
+export PYBUILD_TEST_ARGS=\
+-k "not test_add_shapefiles_from_dict_agg \
and not test_add_shapefiles_from_dict_pil \
and not test_add_one_shapefile_from_cfg_agg \
and not test_add_one_shapefile_from_cfg_pil \
+and not test_add_points_pil \
+and not test_config_file_points_and_borders_pil \
+and not test_add_cities_pil \
and not test_add_cities_cfg_pil \
and not test_add_cities_from_dict_pil \
-and not test_add_cities_pil \
and not test_add_grid_from_dict_pil \
and not test_eastern_shapes_pil \
+and not test_western_shapes_pil \
and not test_no_h_scratch_pil \
-and not test_no_v_scratch_pil \
-and not test_western_shapes_pil"
+and not test_no_v_scratch_pil" \
+$(CURDIR)/pycoast/tests
%:
dh $@ --with python3,numpy3,sphinxdoc --buildsystem=pybuild
=====================================
debian/tests/python3
=====================================
@@ -8,21 +8,22 @@ cd "$AUTOPKGTEST_TMP"
for py in $PYS; do
echo "=== $py ==="
- $py -m pytest -v ${TESTDIR} \
--k "not test_add_points_pil and not test_config_file_points_and_borders_pil \
-and not test_add_shapefiles_from_dict_agg \
+ $py -m pytest -v \
+-k "not test_add_shapefiles_from_dict_agg \
and not test_add_shapefiles_from_dict_pil \
and not test_add_one_shapefile_from_cfg_agg \
and not test_add_one_shapefile_from_cfg_pil \
+and not test_add_points_pil \
+and not test_config_file_points_and_borders_pil \
+and not test_add_cities_pil \
and not test_add_cities_cfg_pil \
and not test_add_cities_from_dict_pil \
-and not test_add_cities_pil \
and not test_add_grid_from_dict_pil \
and not test_eastern_shapes_pil \
+and not test_western_shapes_pil \
and not test_no_h_scratch_pil \
and not test_no_v_scratch_pil \
-and not test_western_shapes_pil \
and not test_add_cities_cfg_agg \
-and not test_add_cities_from_dict_agg"
-
+and not test_add_cities_from_dict_agg" \
+${TESTDIR}
done
View it on GitLab: https://salsa.debian.org/debian-gis-team/pycoast/-/compare/fb6f2d8e2c5bf9d899e5a39f9babcd5fc0402e6d...6e836d7962d27dc5f5615fc8ecef95f05c179bb2
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pycoast/-/compare/fb6f2d8e2c5bf9d899e5a39f9babcd5fc0402e6d...6e836d7962d27dc5f5615fc8ecef95f05c179bb2
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/20230708/2129fc0d/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list