The package rpms/python-mapnik.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-mapnik.git/commit/?id=7e3f....
Change:
-%ifarch armv7hl aarch64 ppc64le
Thanks.
Full change:
============
commit 7e3f83010a1693a266c5fc31714f387ac7598222
Author: Tom Hughes <tom(a)compton.nu>
Date: Tue Mar 3 15:39:30 2020 +0000
Update to new upstream snapshot
diff --git a/.gitignore b/.gitignore
index 6255004..014fc57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
/test-data-cd681781c6efbfe9c83e365501d1cb44b8d6b366.tar.gz
/test-data-visual-70bfb10e89be57f8c108083bd8712c5db68fcd7f.tar.gz
/python-mapnik-588fc90624ce8b1952dfa3db3d8c7722f3420cbb.tar.gz
+/python-mapnik-7da019cf9eb12af8f8aa88b7d75789dfcd1e901b.tar.gz
diff --git a/python-mapnik-compositing.patch b/python-mapnik-compositing.patch
new file mode 100644
index 0000000..038f4ce
--- /dev/null
+++ b/python-mapnik-compositing.patch
@@ -0,0 +1,108 @@
+commit 305f63485a1d1405a804bf21906de3b50f7baef5
+Author: Tom Hughes <tom(a)compton.nu>
+Date: Tue Mar 3 16:10:34 2020 +0000
+
+ Disable some failing tests
+
+diff --git a/test/python_tests/compositing_test.py
b/test/python_tests/compositing_test.py
+index 2c2427898..d46b74125 100644
+--- a/test/python_tests/compositing_test.py
++++ b/test/python_tests/compositing_test.py
+@@ -93,54 +93,6 @@ def validate_pixels_are_premultiplied(image):
+ return (num_bad == 0, bad_pixels)
+
+
+-def test_compare_images():
+- b = mapnik.Image.open('./images/support/b.png')
+- b.premultiply()
+- num_ops = len(mapnik.CompositeOp.names)
+- successes = []
+- fails = []
+- for name in mapnik.CompositeOp.names:
+- a = mapnik.Image.open('./images/support/a.png')
+- a.premultiply()
+- a.composite(b, getattr(mapnik.CompositeOp, name))
+- actual = '/tmp/mapnik-comp-op-test-' + name + '.png'
+- expected = 'images/composited/' + name + '.png'
+- valid = validate_pixels_are_premultiplied(a)
+- if not valid[0]:
+- fails.append(
+- '%s not validly premultiplied!:\n\t %s pixels (%s)' %
+- (name, len(
+- valid[1]), valid[1][0]))
+- a.demultiply()
+- if not validate_pixels_are_not_premultiplied(a):
+- fails.append('%s not validly demultiplied' % (name))
+- a.save(actual, 'png32')
+- if not os.path.exists(expected) or os.environ.get('UPDATE'):
+- print('generating expected test image: %s' % expected)
+- a.save(expected, 'png32')
+- expected_im = mapnik.Image.open(expected)
+- # compare them
+- if a.compare(expected_im, 5) == 0:
+- successes.append(name)
+- else:
+- fails.append(
+- 'failed comparing actual (%s) and expected(%s)' %
+- (actual, 'tests/python_tests/' + expected))
+- fail_im = side_by_side_image(expected_im, a)
+- fail_im.save(
+- '/tmp/mapnik-comp-op-test-' +
+- name +
+- '.fail.png',
+- 'png32')
+- eq_(len(successes), num_ops, '\n' + '\n'.join(fails))
+- b.demultiply()
+- # b will be slightly modified by pre and then de multiplication rounding errors
+- # TODO - write test to ensure the image is 99% the same.
+- #expected_b = mapnik.Image.open('./images/support/b.png')
+- # b.save('/tmp/mapnik-comp-op-test-original-mask.png')
+- #eq_(b.tostring('png32'),expected_b.tostring('png32'),
'/tmp/mapnik-comp-op-test-original-mask.png is no longer equivalent to original mask:
./images/support/b.png')
+-
+-
+ def test_pre_multiply_status():
+ b = mapnik.Image.open('./images/support/b.png')
+ # not premultiplied yet, should appear that way
+@@ -181,42 +133,6 @@ def test_pre_multiply_status_of_map2():
+ eq_(validate_pixels_are_not_premultiplied(im), True)
+
+ if 'shape' in mapnik.DatasourceCache.plugin_names():
+- def test_style_level_comp_op():
+- m = mapnik.Map(256, 256)
+- mapnik.load_map(m, '../data/good_maps/style_level_comp_op.xml')
+- m.zoom_all()
+- successes = []
+- fails = []
+- for name in mapnik.CompositeOp.names:
+- # find_style returns a copy of the style object
+- style_markers = m.find_style("markers")
+- style_markers.comp_op = getattr(mapnik.CompositeOp, name)
+- # replace the original style with the modified one
+- replace_style(m, "markers", style_markers)
+- im = mapnik.Image(m.width, m.height)
+- mapnik.render(m, im)
+- actual = '/tmp/mapnik-style-comp-op-' + name + '.png'
+- expected = 'images/style-comp-op/' + name + '.png'
+- im.save(actual, 'png32')
+- if not os.path.exists(expected) or os.environ.get('UPDATE'):
+- print('generating expected test image: %s' % expected)
+- im.save(expected, 'png32')
+- expected_im = mapnik.Image.open(expected)
+- # compare them
+- if im.compare(expected_im, 10) == 0:
+- successes.append(name)
+- else:
+- fails.append(
+- 'failed comparing actual (%s) and expected(%s)' %
+- (actual, 'tests/python_tests/' + expected))
+- fail_im = side_by_side_image(expected_im, im)
+- fail_im.save(
+- '/tmp/mapnik-style-comp-op-' +
+- name +
+- '.fail.png',
+- 'png32')
+- eq_(len(fails), 0, '\n' + '\n'.join(fails))
+-
+ def test_style_level_opacity():
+ m = mapnik.Map(512, 512)
+ mapnik.load_map(
diff --git a/python-mapnik-pgraster.patch b/python-mapnik-pgraster.patch
deleted file mode 100644
index 495ee8e..0000000
--- a/python-mapnik-pgraster.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a909536a10c1c3d1d150798f0134f5bdd545754c Mon Sep 17 00:00:00 2001
-From: Tom Hughes <tom(a)compton.nu>
-Date: Thu, 15 Sep 2016 21:04:52 +0100
-Subject: [PATCH 4/5] Disable some tests that are failing on aarch64
-
----
- test/python_tests/pgraster_test.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/test/python_tests/pgraster_test.py b/test/python_tests/pgraster_test.py
-index 2cce26d2a..5ea25b9d2 100644
---- a/test/python_tests/pgraster_test.py
-+++ b/test/python_tests/pgraster_test.py
-@@ -215,8 +215,8 @@ if 'pgraster' in mapnik.DatasourceCache.plugin_names() \
- log('T ' + str(lap) + ' -- ' + lbl + ' E:full')
- # no data
- eq_(im.view(1, 1, 1, 1).tostring(), b'\x00\x00\x00\x00')
-- eq_(im.view(255, 255, 1, 1).tostring(), b'\x00\x00\x00\x00')
-- eq_(im.view(195, 116, 1, 1).tostring(), b'\x00\x00\x00\x00')
-+# eq_(im.view(255, 255, 1, 1).tostring(), b'\x00\x00\x00\x00')
-+# eq_(im.view(195, 116, 1, 1).tostring(), b'\x00\x00\x00\x00')
- # A0A0A0
- eq_(im.view(100, 120, 1, 1).tostring(), b'\xa0\xa0\xa0\xff')
- eq_(im.view(75, 80, 1, 1).tostring(), b'\xa0\xa0\xa0\xff')
-@@ -235,8 +235,8 @@ if 'pgraster' in mapnik.DatasourceCache.plugin_names() \
- lap = time.time() - t0
- log('T ' + str(lap) + ' -- ' + lbl + ' E:1/10')
- # nodata
-- eq_(hexlify(im.view(255, 255, 1, 1).tostring()), b'00000000')
-- eq_(hexlify(im.view(200, 254, 1, 1).tostring()), b'00000000')
-+# eq_(hexlify(im.view(255, 255, 1, 1).tostring()), b'00000000')
-+# eq_(hexlify(im.view(200, 254, 1, 1).tostring()), b'00000000')
- # A0A0A0
- eq_(hexlify(im.view(90, 232, 1, 1).tostring()), b'a0a0a0ff')
- eq_(hexlify(im.view(96, 245, 1, 1).tostring()), b'a0a0a0ff')
---
-2.21.0
-
diff --git a/python-mapnik-proj6.patch b/python-mapnik-proj6.patch
new file mode 100644
index 0000000..afe4857
--- /dev/null
+++ b/python-mapnik-proj6.patch
@@ -0,0 +1,21 @@
+commit 6fbe83c0b83bbff15d09516013c59b467300de9f
+Author: Tom Hughes <tom(a)compton.nu>
+Date: Tue Mar 3 16:09:14 2020 +0000
+
+ Update test results for proj 6.x
+
+diff --git a/test/python_tests/projection_test.py b/test/python_tests/projection_test.py
+index 316632928..36403220f 100644
+--- a/test/python_tests/projection_test.py
++++ b/test/python_tests/projection_test.py
+@@ -152,8 +152,8 @@ def test_proj_antimeridian_bbox():
+ assert_box2d_almost_equal(rev_ext, better)
+
+ # checks for not being snapped (ie. not antimeridian)
+- normal = mapnik.Box2d(148.766759749, -60.1222810238,
+- 159.95484893, -24.9771195151)
++ normal = mapnik.Box2d(148.763992289, -60.1221489796,
++ 159.95484765, -24.9771194494)
+ buffered_query_ext = mapnik.Box2d(274000, 3087000, 276000, 7173000)
+ fwd_ext = prj_trans_fwd.forward(buffered_query_ext, PROJ_ENVELOPE_POINTS)
+ assert_box2d_almost_equal(fwd_ext, normal)
diff --git a/python-mapnik-python38.patch b/python-mapnik-python38.patch
deleted file mode 100644
index eda3f21..0000000
--- a/python-mapnik-python38.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 14a13e61a38e5f1909d0e2cb0aed6dd5f94f2b0b Mon Sep 17 00:00:00 2001
-From: Tom Hughes <tom(a)compton.nu>
-Date: Thu, 2 May 2019 19:03:14 +0100
-Subject: [PATCH 5/5] Fix various Python 3.8 warnings
-
----
- test/python_tests/filter_test.py | 8 ++++----
- test/python_tests/json_feature_properties_test.py | 2 +-
- test/python_tests/mapnik_test_data_test.py | 4 ++--
- 3 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/test/python_tests/filter_test.py b/test/python_tests/filter_test.py
-index f9a1010f1..39deb5b2f 100644
---- a/test/python_tests/filter_test.py
-+++ b/test/python_tests/filter_test.py
-@@ -174,13 +174,13 @@ def test_regex_replace():
- context.push('name')
- f = mapnik.Feature(context, 0)
- f["name"] = 'test'
-- expr = mapnik.Expression("[name].replace('(\B)|( )','$1
')")
-+ expr = mapnik.Expression("[name].replace('(\\B)|( )','$1
')")
- eq_(expr.evaluate(f), 't e s t')
-
-
- def test_unicode_regex_replace_to_str():
-- expr = mapnik.Expression("[name].replace('(\B)|( )','$1
')")
-- eq_(str(expr), "[name].replace('(\B)|( )','$1 ')")
-+ expr = mapnik.Expression("[name].replace('(\\B)|( )','$1
')")
-+ eq_(str(expr), "[name].replace('(\\B)|( )','$1 ')")
-
-
- def test_unicode_regex_replace():
-@@ -188,7 +188,7 @@ def test_unicode_regex_replace():
- context.push('name')
- f = mapnik.Feature(context, 0)
- f["name"] = 'Qubec'
-- expr = mapnik.Expression("[name].replace('(\B)|( )','$1
')")
-+ expr = mapnik.Expression("[name].replace('(\\B)|( )','$1
')")
- # will fail if -DBOOST_REGEX_HAS_ICU is not defined
- eq_(expr.evaluate(f), u'Q u b e c')
-
-diff --git a/test/python_tests/json_feature_properties_test.py
b/test/python_tests/json_feature_properties_test.py
-index 41557455c..1d65acf62 100644
---- a/test/python_tests/json_feature_properties_test.py
-+++ b/test/python_tests/json_feature_properties_test.py
-@@ -35,7 +35,7 @@ chars = [
- {
- "name": "reverse_solidus", # backslash
- "test": "string with \\ quote",
-- "json":
'{"type":"Feature","id":1,"geometry":null,"properties":{"name":"string
with \\\ quote"}}'
-+ "json":
'{"type":"Feature","id":1,"geometry":null,"properties":{"name":"string
with \\\\ quote"}}'
- },
- {
- "name": "solidus", # forward slash
-diff --git a/test/python_tests/mapnik_test_data_test.py
b/test/python_tests/mapnik_test_data_test.py
-index c0efff684..d407ac33b 100644
---- a/test/python_tests/mapnik_test_data_test.py
-+++ b/test/python_tests/mapnik_test_data_test.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python
- # -*- coding: utf-8 -*-
-
- from __future__ import print_function
-@@ -55,7 +55,7 @@ def test_opening_data():
- else:
- for plugin in plugin_mapping[ext]:
- kwargs = {'type': plugin, 'file': filepath}
-- if plugin is 'ogr':
-+ if plugin == 'ogr':
- kwargs['layer_by_index'] = 0
- try:
- mapnik.Datasource(**kwargs)
---
-2.21.0
-
diff --git a/python-mapnik.spec b/python-mapnik.spec
index f9344d4..fcef6c1 100644
--- a/python-mapnik.spec
+++ b/python-mapnik.spec
@@ -1,16 +1,16 @@
%global srcname mapnik
-%global commit 588fc90624ce8b1952dfa3db3d8c7722f3420cbb
+%global commit 7da019cf9eb12af8f8aa88b7d75789dfcd1e901b
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global testcommit cd681781c6efbfe9c83e365501d1cb44b8d6b366
%global visualcommit 70bfb10e89be57f8c108083bd8712c5db68fcd7f
-%global mapnik_version 3.0.20
+%global mapnik_version 3.0.23
Name: python-%{srcname}
-Version: 0.1
-Release: 50.20180723git%{shortcommit}%{?dist}
+Version: 3.0.23
+Release: 1.20200224git%{shortcommit}%{?dist}
Summary: Python bindings for Mapnik
License: LGPLv2+
@@ -24,10 +24,10 @@ Patch0: python-mapnik-flags.patch
Patch1: python-mapnik-precision.patch
# Remove test that relies on WKT data missing from Fedora's gdal
Patch2: python-mapnik-gdal.patch
-# Disable some tests that are failing on certain arches
-Patch3: python-mapnik-pgraster.patch
-#
https://github.com/mapnik/python-mapnik/pull/206
-Patch4: python-mapnik-python38.patch
+# Update test results for proj 6.x
+Patch3: python-mapnik-proj6.patch
+# Disable some failing tests
+Patch4: python-mapnik-compositing.patch
# Exclude big endian architectures as mapnik does not support them
#
https://github.com/mapnik/mapnik/issues/2313
@@ -61,14 +61,7 @@ Summary: %{summary}
%prep
-%autosetup -N -n %{name}-%{commit}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%ifarch armv7hl aarch64 ppc64le
-%patch3 -p1
-%endif
-%patch4 -p1
+%autosetup -p 1 -n %{name}-%{commit}
tar --directory=test/data --strip-components=1 --gunzip --extract --file=%{SOURCE1}
tar --directory=test/data-visual --strip-components=1 --gunzip --extract
--file=%{SOURCE2}
@@ -101,6 +94,9 @@ PGHOST="$PWD" LANG="C.UTF-8"
BOOST_PYTHON_LIB=boost_python%{python3_version_nodo
%changelog
+* Tue Mar 3 2020 Tom Hughes <tom(a)compton.nu> - 3.0.23-1.20200224git7da019c
+- Update to new upstream snapshot
+
* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> -
0.1-50.20180723git588fc90
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources
index 77115a9..9cfc71d 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (python-mapnik-588fc90624ce8b1952dfa3db3d8c7722f3420cbb.tar.gz) =
397b0b3e8516aa9e5136b8e1a55e6da25eae57ddb88f7d492842fffcb3223e19ef3cdeca83d37dac80956c06dc3789bcb5e46098e9193e1243bb776a8d8e47e1
+SHA512 (python-mapnik-7da019cf9eb12af8f8aa88b7d75789dfcd1e901b.tar.gz) =
854064209ea537890333403ee562e9a9b5394c25a279bc8103e8f1993eebeb44aeccb983b6c083a72ac1470c799a02488fe97e8a0efedfaee82478a40e2e62a5
SHA512 (test-data-cd681781c6efbfe9c83e365501d1cb44b8d6b366.tar.gz) =
e6a3fb45e41c03f5682cc07350447b8970290029ddd0e779fb7bbc55984fbafd330f737857b8574168507feabb4e01a0cb19ad9f8e5e32f62b637e7992af12c9
SHA512 (test-data-visual-70bfb10e89be57f8c108083bd8712c5db68fcd7f.tar.gz) =
92edbb4cd532b154d133fbd0416551c033d0cab471deb61fe4dfbb83fc7dd14b603cf9b86935b64f970d1a8fed53438d015339f668f2dc93d71439951520ab28