Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
Enable pie hardening flags.
· af5e0f2f
Bas Couwenberg
authored
Jul 12, 2019
af5e0f2f
Add patch to skip tests that fail with PROJ 6.
· 71c08b5d
Bas Couwenberg
authored
Jul 12, 2019
71c08b5d
Set distribution to unstable.
· 0b8db91a
Bas Couwenberg
authored
Jul 12, 2019
0b8db91a
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
0b8db91a
python-cartopy (0.17.0+dfsg-4) UNRELEASED; urgency=medium
python-cartopy (0.17.0+dfsg-4) unstable; urgency=medium
* Team upload.
[ Antonio Valentino ]
* Link examples into the doc directory.
...
...
@@ -13,8 +15,10 @@ python-cartopy (0.17.0+dfsg-4) UNRELEASED; urgency=medium
* Update dh_install override to use --list-missing.
* Update gbp.conf to use --source-only-changes by default.
* Bump Standards-Version to 4.4.0, no changes.
* Enable pie hardening flags.
* Add patch to skip tests that fail with PROJ 6.
--
Antonio Valentino <antonio.valentino@tiscali.it> Sun, 10 Feb 2019 08:40:13
+0
0
00
--
Bas Couwenberg <sebastic@debian.org> Fri, 12 Jul 2019 12:35:21
+0
2
00
python-cartopy (0.17.0+dfsg-3) unstable; urgency=medium
...
...
debian/patches/series
View file @
0b8db91a
0001-Skip-tests-failing-on-i386-architectures.patch
0002-no-network.patch
skip-test-with-proj6.patch
debian/patches/skip-test-with-proj6.patch
0 → 100644
View file @
0b8db91a
Description: Skip tests that fail with PROJ 6.
Author: Bas Couwenberg <sebastic@debian.org>
Bug: https://github.com/SciTools/cartopy/issues/1140
Forwarded: not-needed
--- a/lib/cartopy/tests/crs/test_transverse_mercator.py
+++ b/lib/cartopy/tests/crs/test_transverse_mercator.py
@@ -21,7 +21,10 @@
Tests for the Transverse Mercator projec
from __future__ import (absolute_import, division, print_function)
+import os
+
import numpy as np
+import pytest
import cartopy.crs as ccrs
@@ -32,6 +35,7 @@
class TestTransverseMercator(object):
self.point_b = (0.5, 50.5)
self.src_crs = ccrs.PlateCarree()
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_default(self):
proj = ccrs.TransverseMercator()
res = proj.transform_point(*self.point_a, src_crs=self.src_crs)
@@ -41,6 +45,7 @@
class TestTransverseMercator(object):
np.testing.assert_array_almost_equal(res, (35474.63566645,
5596583.41949901))
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_osgb_vals(self):
proj = ccrs.TransverseMercator(central_longitude=-2,
central_latitude=49,
@@ -56,6 +61,7 @@
class TestTransverseMercator(object):
np.testing.assert_array_almost_equal(res, (577274.98380140,
69740.49227181))
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_nan(self):
proj = ccrs.TransverseMercator()
res = proj.transform_point(0.0, float('nan'), src_crs=self.src_crs)
@@ -71,6 +77,7 @@
class TestOSGB(object):
self.src_crs = ccrs.PlateCarree()
self.nan = float('nan')
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_default(self):
proj = ccrs.OSGB()
res = proj.transform_point(*self.point_a, src_crs=self.src_crs)
@@ -80,6 +87,7 @@
class TestOSGB(object):
np.testing.assert_array_almost_equal(res, (577274.98380140,
69740.49227181))
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_nan(self):
proj = ccrs.OSGB()
res = proj.transform_point(0.0, float('nan'), src_crs=self.src_crs)
@@ -101,6 +109,7 @@
class TestOSNI(object):
res, (275614.26762651594, 386984.206429612),
decimal=0 if ccrs.PROJ4_VERSION < (5, 0, 0) else 6)
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_nan(self):
proj = ccrs.OSNI()
res = proj.transform_point(0.0, float('nan'), src_crs=self.src_crs)
--- a/lib/cartopy/tests/mpl/test_set_extent.py
+++ b/lib/cartopy/tests/mpl/test_set_extent.py
@@ -17,10 +17,13 @@
from __future__ import (absolute_import, division, print_function)
+import os
+
from matplotlib.testing.decorators import cleanup
import matplotlib.pyplot as plt
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_equal
+import pytest
import cartopy.crs as ccrs
@@ -148,6 +151,7 @@
def test_limits_pcolor():
plt.close()
+@pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_view_lim_autoscaling():
x = np.linspace(0.12910209, 0.42141822)
y = np.linspace(0.03739792, 0.33029076)
--- a/lib/cartopy/tests/test_crs.py
+++ b/lib/cartopy/tests/test_crs.py
@@ -18,6 +18,7 @@
from __future__ import (absolute_import, division, print_function)
from io import BytesIO
+import os
import pickle
import numpy as np
@@ -106,6 +107,7 @@
class TestCRS(object):
# International 1924 ellipsoid.
assert '+ellps=intl' in proj4_init
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_transform_points_nD(self):
rlons = np.array([[350., 352., 354.], [350., 352., 354.]])
rlats = np.array([[-5., -0., 1.], [-4., -1., 0.]])
@@ -126,6 +128,7 @@
class TestCRS(object):
assert_arr_almost_eq(unrotated_lon, solx)
assert_arr_almost_eq(unrotated_lat, soly)
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_transform_points_1D(self):
rlons = np.array([350., 352., 354., 356.])
rlats = np.array([-5., -0., 5., 10.])
--- a/lib/cartopy/tests/test_line_string.py
+++ b/lib/cartopy/tests/test_line_string.py
@@ -18,6 +18,7 @@
from __future__ import (absolute_import, division, print_function)
import itertools
+import os
import time
import numpy as np
@@ -28,6 +29,7 @@
import cartopy.crs as ccrs
class TestLineString(object):
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_out_of_bounds(self):
# Check that a line that is completely out of the map boundary produces
# a valid LineString
--- a/lib/cartopy/tests/test_linear_ring.py
+++ b/lib/cartopy/tests/test_linear_ring.py
@@ -17,6 +17,8 @@
from __future__ import (absolute_import, division, print_function)
+import os
+
import numpy as np
import pytest
import shapely.geometry as sgeom
@@ -56,6 +58,7 @@
class TestBoundary(object):
assert_intersection_with_boundary(coords[1::-1])
assert_intersection_with_boundary(coords[-2:])
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_out_of_bounds(self):
# Check that a ring that is completely out of the map boundary
# produces an empty result.
--- a/lib/cartopy/tests/test_polygon.py
+++ b/lib/cartopy/tests/test_polygon.py
@@ -17,6 +17,8 @@
from __future__ import (absolute_import, division, print_function)
+import os
+
import numpy as np
import pytest
import shapely.geometry as sgeom
@@ -48,6 +50,7 @@
class TestBoundary(object):
# fails.
projection.project_geometry(polygon)
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_out_of_bounds(self):
# Check that a polygon that is completely out of the map boundary
# doesn't produce an empty result.
@@ -189,6 +192,7 @@
class TestMisc(object):
assert len(multi_polygon) == 1
assert len(multi_polygon[0].exterior.coords) == 4
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_self_intersecting_1(self):
# Geometry comes from a matplotlib contourf (see #537)
wkt = ('POLYGON ((366.22000122 -9.71489298, '
@@ -210,6 +214,7 @@
class TestMisc(object):
assert 2.2e9 < area < 2.3e9, \
'Got area {}, expecting ~2.2e9'.format(area)
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_self_intersecting_2(self):
# Geometry comes from a matplotlib contourf (see #509)
wkt = ('POLYGON ((343 20, 345 23, 342 25, 343 22, '
@@ -273,6 +278,7 @@
class TestQuality(object):
# from cartopy.tests.mpl import show
# show(projection, self.multi_polygon)
+ @pytest.mark.skipif(os.path.exists('/usr/share/proj/proj.db'), reason='Fails with PROJ 6')
def test_split(self):
# Start simple ... there should be two projected polygons.
assert len(self.multi_polygon) == 2
debian/rules
View file @
0b8db91a
...
...
@@ -3,7 +3,7 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
,-pie
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Workaround for proj_api.h deprecation in PROJ 6.0.0
export DEB_CFLAGS_MAINT_APPEND=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
...
...