Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-MapProxy for openSUSE:Factory
checked in at 2023-09-25 20:02:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-MapProxy (Old)
and /work/SRC/openSUSE:Factory/.python-MapProxy.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-MapProxy"
Mon Sep 25 20:02:11 2023 rev:9 rq:1113210 version:1.16.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-MapProxy/python-MapProxy.changes
2023-08-30 10:23:46.843209799 +0200
+++
/work/SRC/openSUSE:Factory/.python-MapProxy.new.1770/python-MapProxy.changes
2023-09-25 20:03:26.518677037 +0200
@@ -1,0 +2,9 @@
+Sat Sep 23 11:08:41 UTC 2023 - Ben Greiner <[email protected]>
+
+- Add MapProxy-pr749-shapely2.patch
+ * gh#mapproxy/mapproxy#611
+ * gh#mapproxy/mapproxy#749
+- Add MapProxy-pr750-Pillow10.patch
+ * gh#mapproxy/mapproxy#750
+
+-------------------------------------------------------------------
New:
----
MapProxy-pr749-shapely2.patch
MapProxy-pr750-Pillow10.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-MapProxy.spec ++++++
--- /var/tmp/diff_new_pack.8XW2AW/_old 2023-09-25 20:03:27.994730253 +0200
+++ /var/tmp/diff_new_pack.8XW2AW/_new 2023-09-25 20:03:27.994730253 +0200
@@ -30,6 +30,10 @@
Source1:
https://github.com/mapproxy/mapproxy/raw/%{version}/mapproxy/test/system/fixture/cache.gpkg
Source2:
https://github.com/mapproxy/mapproxy/raw/%{version}/mapproxy/test/unit/polygons/polygons.geojson
Source99: python-MapProxy-rpmlintrc
+# PATCH-FIX-UPSTREAM MapProxy-pr749-shapely2.patch gh#mapproxy/mapproxy#749
+Patch0: MapProxy-pr749-shapely2.patch
+# PATCH-FIX-UPSTREAM MapProxy-pr750-Pillow10.patch gh#mapproxy/mapproxy#750
+Patch1: MapProxy-pr750-Pillow10.patch
BuildRequires: %{python_module GDAL}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module PyYAML >= 3.0}
@@ -41,7 +45,7 @@
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module Paste}
-BuildRequires: %{python_module Shapely}
+BuildRequires: %{python_module Shapely >= 2}
BuildRequires: %{python_module WebTest}
BuildRequires: %{python_module Werkzeug}
BuildRequires: %{python_module boto3}
@@ -61,6 +65,7 @@
Requires: proj
Requires: python-Pillow
Requires: python-PyYAML >= 3.0
+Recommends: python-Shapely >= 1.8
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun):update-alternatives
@@ -72,7 +77,7 @@
serves any desktop or web GIS client.
%prep
-%setup -q -n MapProxy-%{version}
+%autosetup -p1 -n MapProxy-%{version}
# Source1 required twice
cp %{SOURCE1} mapproxy/test/system/fixture/
mkdir -p mapproxy/test/unit/fixture/
++++++ MapProxy-pr749-shapely2.patch ++++++
diff -ur MapProxy-1.16.0.orig/doc/install.rst MapProxy-1.16.0/doc/install.rst
--- MapProxy-1.16.0.orig/doc/install.rst 2023-09-23 13:29:24.276700414
+0200
+++ MapProxy-1.16.0/doc/install.rst 2023-09-23 13:45:05.044736623 +0200
@@ -90,7 +90,7 @@
Shapely and GEOS *(optional)*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-You will need Shapely to use the :doc:`coverage feature <coverages>` of
MapProxy. Shapely offers Python bindings for the GEOS library. You need Shapely
(``python-shapely``) and GEOS (``libgeos-dev``). You can install Shapely as a
Python package with ``pip install Shapely`` if you system does not provide a
recent (>= 1.2.0) version of Shapely.
+You will need Shapely to use the :doc:`coverage feature <coverages>` of
MapProxy. Shapely offers Python bindings for the GEOS library. You need Shapely
(``python-shapely``) and GEOS (``libgeos-dev``). You can install Shapely as a
Python package with ``pip install Shapely`` if you system does not provide a
recent (>= 2.0) version of Shapely.
GDAL *(optional)*
~~~~~~~~~~~~~~~~~
diff -ur MapProxy-1.16.0.orig/mapproxy/test/unit/test_geom.py
MapProxy-1.16.0/mapproxy/test/unit/test_geom.py
--- MapProxy-1.16.0.orig/mapproxy/test/unit/test_geom.py 2023-09-23
13:29:24.296700984 +0200
+++ MapProxy-1.16.0/mapproxy/test/unit/test_geom.py 2023-09-23
13:47:35.062488445 +0200
@@ -22,11 +22,7 @@
import pytest
import shapely
import shapely.prepared
-try:
- # shapely >=1.6
- from shapely.errors import ReadingError
-except ImportError:
- from shapely.geos import ReadingError
+from shapely.errors import ReadingError
from mapproxy.srs import SRS, bbox_equals
from mapproxy.util.geom import (
diff -ur MapProxy-1.16.0.orig/mapproxy/util/geom.py
MapProxy-1.16.0/mapproxy/util/geom.py
--- MapProxy-1.16.0.orig/mapproxy/util/geom.py 2023-09-23 13:29:24.296700984
+0200
+++ MapProxy-1.16.0/mapproxy/util/geom.py 2023-09-23 13:40:07.882521741
+0200
@@ -32,11 +32,7 @@
import shapely.geometry
import shapely.ops
import shapely.prepared
- try:
- # shapely >=1.6
- from shapely.errors import ReadingError
- except ImportError:
- from shapely.geos import ReadingError
+ from shapely.errors import ReadingError
geom_support = True
except ImportError:
geom_support = False
@@ -234,7 +230,7 @@
def transform_multipolygon(transf, multipolygon):
transformed_polygons = []
- for polygon in multipolygon:
+ for polygon in multipolygon.geoms:
transformed_polygons.append(transform_polygon(transf, polygon))
return shapely.geometry.MultiPolygon(transformed_polygons)
++++++ MapProxy-pr750-Pillow10.patch ++++++
diff --git a/mapproxy/compat/image.py b/mapproxy/compat/image.py
index e88bbc41..3732b890 100644
--- a/mapproxy/compat/image.py
+++ b/mapproxy/compat/image.py
@@ -26,6 +26,7 @@ try:
Image, ImageColor, ImageDraw, ImageFont, ImagePalette, ImageChops,
ImageMath
ImageFileDirectory_v2, TiffTags
PIL_VERSION = getattr(PIL, '__version__') or getattr(PIL, 'PILLOW_VERSION')
+ PIL_VERSION_TUPLE = tuple(int(i) for i in PIL_VERSION.split("."))
except ImportError:
# allow MapProxy to start without PIL (for tilecache only).
# issue warning and raise ImportError on first use of
diff --git a/mapproxy/image/message.py b/mapproxy/image/message.py
index 4353e590..e40e53df 100644
--- a/mapproxy/image/message.py
+++ b/mapproxy/image/message.py
@@ -281,8 +281,14 @@ class TextDraw(object):
boxes = []
y_offset = 0
for i, line in enumerate(self.text):
- text_size = draw.textsize(line, font=self.font)
- text_box = (0, y_offset, text_size[0], text_size[1]+y_offset)
+ try:
+ text_box = draw.textbbox((0, y_offset), line, font=self.font)
+ y_offset = text_box[3] + self.linespacing
+ except AttributeError:
+ # Pillow < 8
+ text_size = draw.textsize(line, font=self.font)
+ text_box = (0, y_offset, text_size[0], text_size[1]+y_offset)
+ y_offset += text_size[1] + self.linespacing
boxes.append(text_box)
total_bbox = (min(total_bbox[0], text_box[0]),
min(total_bbox[1], text_box[1]),
@@ -290,7 +296,7 @@ class TextDraw(object):
max(total_bbox[3], text_box[3]),
)
- y_offset += text_size[1] + self.linespacing
+
return total_bbox, boxes
def _move_bboxes(self, boxes, offsets):
diff --git a/mapproxy/test/unit/test_image.py b/mapproxy/test/unit/test_image.py
index f2ea15ec..d4b62468 100644
--- a/mapproxy/test/unit/test_image.py
+++ b/mapproxy/test/unit/test_image.py
@@ -21,7 +21,7 @@ from io import BytesIO
import pytest
-from mapproxy.compat.image import Image, ImageDraw, PIL_VERSION
+from mapproxy.compat.image import Image, ImageDraw, PIL_VERSION_TUPLE
from mapproxy.image import (
BlankImageSource,
GeoReference,
@@ -112,7 +112,7 @@ class TestImageSource(object):
assert is_tiff(ir.as_buffer(TIFF_FORMAT))
assert is_tiff(ir.as_buffer())
- @pytest.mark.skipif(PIL_VERSION < '6.1.0', reason="Pillow 6.1.0 required
GeoTIFF")
+ @pytest.mark.skipif(PIL_VERSION_TUPLE < (6, 1, 0), reason="Pillow 6.1.0
required GeoTIFF")
def test_tiff_compression(self):
def encoded_size(encoding_options):
ir = ImageSource(create_debug_img((100, 100)), PNG_FORMAT)
@@ -134,7 +134,7 @@ class TestImageSource(object):
assert q50 > lzw
@pytest.mark.xfail(
- PIL_VERSION >= '9.0.0',
+ PIL_VERSION_TUPLE >= (9, 0, 0),
reason="The palette colors order has been changed in Pillow 9.0.0"
)
def test_output_formats_greyscale_png(self):
@@ -156,7 +156,7 @@ class TestImageSource(object):
assert img.getpixel((0, 0)) == (0, 0)
@pytest.mark.xfail(
- PIL_VERSION >= '9.0.0',
+ PIL_VERSION_TUPLE >= (9, 0, 0),
reason="The palette colors order has been changed in Pillow 9.0.0"
)
def test_output_formats_png8(self):
@@ -593,7 +593,7 @@ def assert_geotiff_tags(img, expected_origin,
expected_pixel_res, srs, projected
assert tags[TIFF_GEOKEYDIRECTORYTAG][3*4+3] == srs
[email protected](PIL_VERSION < '6.1.0', reason="Pillow 6.1.0 required
GeoTIFF")
[email protected](PIL_VERSION_TUPLE < (6, 1, 0), reason="Pillow 6.1.0
required GeoTIFF")
@pytest.mark.parametrize("compression", ['jpeg', 'raw', 'tiff_lzw'])
class TestGeoTIFF(object):