From dd4a860491420816a9be736487b264e3a93be47d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sep 10 2016 20:25:51 +0000 Subject: Update to new snapshot and rebuild against current mapnik --- diff --git a/.gitignore b/.gitignore index 9ce5143..2a0d9b9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ /test-data-visual-972b039bfc5a5e189f68852c22df717a30c1adf7.tar.gz /python-mapnik-db7c1fdb2e970bdc93ab439119465fa5c0df3a07.tar.gz /python-mapnik-1cb6851702f399103391277037edece53e3b1f9b.tar.gz +/python-mapnik-541fd962d4fc99d50ec472af6ddccfdbf98cff37.tar.gz +/test-data-6ce59adfc4f11b16a5dc0e2020c36dc614850989.tar.gz +/test-data-visual-61f0d314b989a345df9515d5bc1472c8d5362990.tar.gz diff --git a/python-mapnik-featureset.patch b/python-mapnik-featureset.patch new file mode 100644 index 0000000..ec13625 --- /dev/null +++ b/python-mapnik-featureset.patch @@ -0,0 +1,37 @@ +commit e16986fc815c6e9b75672e0e137c018942aef0ad +Author: Tom Hughes +Date: Sat Sep 10 19:51:36 2016 +0100 + + Update tests for Featureset iterator changes in 76c73ef0 + +diff --git a/test/python_tests/postgis_test.py b/test/python_tests/postgis_test.py +index bafda20..62077ff 100644 +--- a/test/python_tests/postgis_test.py ++++ b/test/python_tests/postgis_test.py +@@ -729,7 +729,7 @@ if 'postgis' in mapnik.DatasourceCache.plugin_names() \ + max_size=20, + geometry_field='geom') + fs = ds.all_features() +- eq_(len(fs), 8) ++ eq_(len(list(fs)), 8) + + meta = ds.describe() + eq_(meta['srid'], 4326) +@@ -967,7 +967,7 @@ if 'postgis' in mapnik.DatasourceCache.plugin_names() \ + failed = False + try: + fs = ds_bad.featureset() +- for feature in fs.features: ++ for feature in fs: + pass + except RuntimeError as e: + assert 'invalid input syntax for integer' in str(e) +@@ -978,7 +978,7 @@ if 'postgis' in mapnik.DatasourceCache.plugin_names() \ + # Should be ok + fs = ds_good.featureset() + count = 0 +- for feature in fs.features: ++ for feature in fs: + count += 1 + eq_(count, 8) + diff --git a/python-mapnik-flags.patch b/python-mapnik-flags.patch index fbe3a13..8ec4608 100644 --- a/python-mapnik-flags.patch +++ b/python-mapnik-flags.patch @@ -1,14 +1,14 @@ -commit 70d6caa03fbd74d4fd300202019ce3d31b2c5379 +commit 825deb6561490edfddb32723ea4a94a12c400c87 Author: Tom Hughes Date: Sat Jul 11 00:30:09 2015 +0100 Don't try and edit compiler settings diff --git a/setup.py b/setup.py -index 64964d2..5de70db 100755 +index b56b9a1..83af7aa 100755 --- a/setup.py +++ b/setup.py -@@ -81,24 +81,6 @@ class WhichBoostCommand(Command): +@@ -82,24 +82,6 @@ class WhichBoostCommand(Command): print("\n".join(get_boost_library_names())) @@ -33,12 +33,12 @@ index 64964d2..5de70db 100755 if os.environ.get("MASON_BUILD", "false") == "true": # run bootstrap.sh to get mason builds subprocess.call(['./bootstrap.sh']) -@@ -252,8 +234,6 @@ if sys.platform == 'darwin': - linkflags.append('-mmacosx-version-min=10.8') +@@ -245,8 +227,6 @@ if sys.platform == 'darwin': + linkflags.append('-mmacosx-version-min=10.11') else: linkflags.append('-lrt') - linkflags.append('-Wl,-z,origin') -- linkflags.append('-Wl,-rpath=$ORIGIN') +- linkflags.append('-Wl,-rpath=$ORIGIN/lib') if os.environ.get("CC", False) == False: os.environ["CC"] = check_output([mapnik_config, '--cxx']) diff --git a/python-mapnik-precision.patch b/python-mapnik-precision.patch index 7c17a6b..c5e8aa9 100644 --- a/python-mapnik-precision.patch +++ b/python-mapnik-precision.patch @@ -1,4 +1,4 @@ -commit b5378dfb398642015421ff7ba8b6173bb56de0c3 +commit 91eff45bcf7962426b0ac3427257a422d882467b Author: Tom Hughes Date: Mon Nov 23 12:12:32 2015 +0000 @@ -40,7 +40,7 @@ index 7a06db3..0ee2acb 100644 else: fails.append( diff --git a/test/python_tests/markers_complex_rendering_test.py b/test/python_tests/markers_complex_rendering_test.py -index 73a65b6..1dce0d9 100644 +index 652c4ac..d81c5ba 100644 --- a/test/python_tests/markers_complex_rendering_test.py +++ b/test/python_tests/markers_complex_rendering_test.py @@ -26,8 +26,7 @@ if 'csv' in mapnik.DatasourceCache.plugin_names(): @@ -51,7 +51,7 @@ index 73a65b6..1dce0d9 100644 - expected_im.tostring('png32'), + eq_(im.compare(expected_im, 5), 0, 'failed comparing actual (%s) and expected (%s)' % (actual, - 'tests/python_tests/' + expected)) + 'test/python_tests/' + expected)) @@ -43,8 +42,7 @@ if 'csv' in mapnik.DatasourceCache.plugin_names(): if os.environ.get('UPDATE'): @@ -61,10 +61,23 @@ index 73a65b6..1dce0d9 100644 - expected_im.tostring('png32'), + eq_(im.compare(expected_im, 5), 0, 'failed comparing actual (%s) and expected (%s)' % (actual, - 'tests/python_tests/' + expected)) + 'test/python_tests/' + expected)) +diff --git a/test/python_tests/pgraster_test.py b/test/python_tests/pgraster_test.py +index 47c71a6..2bcc8b8 100644 +--- a/test/python_tests/pgraster_test.py ++++ b/test/python_tests/pgraster_test.py +@@ -144,7 +144,7 @@ def compare_images(expected, im): + im.save(expected, 'png32') + expected_im = mapnik.Image.open(expected) + diff = expected.replace('.png', '-diff.png') +- if len(im.tostring("png32")) != len(expected_im.tostring("png32")): ++ if im.compare(expected_im, 300) != 0: + compared = side_by_side_image(expected_im, im) + compared.save(diff) + assert False, 'images do not match, check diff at %s' % diff diff --git a/test/python_tests/raster_symbolizer_test.py b/test/python_tests/raster_symbolizer_test.py -index f6bb053..13cf317 100644 +index caebaab..24573f0 100644 --- a/test/python_tests/raster_symbolizer_test.py +++ b/test/python_tests/raster_symbolizer_test.py @@ -191,8 +191,7 @@ def test_raster_warping(): @@ -88,7 +101,7 @@ index f6bb053..13cf317 100644 expected_file)) diff --git a/test/python_tests/render_test.py b/test/python_tests/render_test.py -index 6e1e3c8..2ae1b9c 100644 +index 42f63f2..8b542ec 100644 --- a/test/python_tests/render_test.py +++ b/test/python_tests/render_test.py @@ -279,8 +279,7 @@ if 'shape' in mapnik.DatasourceCache.plugin_names(): @@ -97,7 +110,7 @@ index 6e1e3c8..2ae1b9c 100644 expected = mapnik.Image.open(expected_file) - eq_(actual.tostring('png32'), - expected.tostring('png32'), -+ eq_(actual.compare(expected, 100), 0, ++ eq_(actual.compare(expected, 20), 0, 'failed comparing actual (%s) and expected (%s)' % (actual_file, expected_file)) diff --git a/python-mapnik.spec b/python-mapnik.spec index 5cbdd8e..5bd8754 100644 --- a/python-mapnik.spec +++ b/python-mapnik.spec @@ -1,14 +1,14 @@ %global srcname mapnik -%global commit 1cb6851702f399103391277037edece53e3b1f9b +%global commit 541fd962d4fc99d50ec472af6ddccfdbf98cff37 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global testcommit 3f15d11635fff10cc4d552629a8195158ba92c3e -%global visualcommit 972b039bfc5a5e189f68852c22df717a30c1adf7 +%global testcommit 6ce59adfc4f11b16a5dc0e2020c36dc614850989 +%global visualcommit 61f0d314b989a345df9515d5bc1472c8d5362990 Name: python-%{srcname} Version: 0.1 -Release: 8.20160202git%{shortcommit}%{?dist} +Release: 9.20160909git%{shortcommit}%{?dist} Summary: Python bindings for Mapnik License: LGPLv2+ @@ -22,6 +22,8 @@ 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 +# https://github.com/mapnik/python-mapnik/pull/109 +Patch3: python-mapnik-featureset.patch BuildRequires: python2-devel python3-devel BuildRequires: python2-nose python3-nose @@ -29,7 +31,7 @@ BuildRequires: python2-nose python3-nose BuildRequires: git-core BuildRequires: mapnik-devel mapnik-static mapnik-utils BuildRequires: boost-devel boost-python3-devel -BuildRequires: pycairo-devel pycairo python3-cairo +BuildRequires: pycairo-devel pycairo python3-cairo-devel python3-cairo BuildRequires: postgresql-server postgis %description @@ -102,6 +104,10 @@ pg_ctl stop -D pg_data %changelog +* Fri Sep 9 2016 Tom Hughes - 0.1-9.20160909git541fd96 +- Update to new snapshot +- Rebuild against current mapnik + * Tue Jul 26 2016 Tom Hughes - 0.1-8.20160202git1cb6851 - Update to new snapshot - Rebuild against current mapnik diff --git a/sources b/sources index ee62832..f2152e0 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -3f79cc3d7a662c5c856af27c827b1bc1 python-mapnik-1cb6851702f399103391277037edece53e3b1f9b.tar.gz -b02c858a36a5da9ee4bd0e02007e5199 test-data-3f15d11635fff10cc4d552629a8195158ba92c3e.tar.gz -691ccd659e1d09f353bc55c5537b1a53 test-data-visual-972b039bfc5a5e189f68852c22df717a30c1adf7.tar.gz +811c05ec3c64cc430b6c0e7573fcbae7 python-mapnik-541fd962d4fc99d50ec472af6ddccfdbf98cff37.tar.gz +422b11d04967d004976979adda6ba91c test-data-6ce59adfc4f11b16a5dc0e2020c36dc614850989.tar.gz +8452076935a3e888e976b190db141479 test-data-visual-61f0d314b989a345df9515d5bc1472c8d5362990.tar.gz