From c8e47c1509653035682cec944b509d90e453c3aa Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Thu, 19 Dec 2019 01:29:41 +0100 Subject: [PATCH] Install spatialpandas --- .travis.yml | 4 ++-- geoviews/tests/data/testmultigeominterface.py | 10 ++++++++++ setup.py | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 621081b4..8dc1504d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ os: env: global: - PYENV_VERSION=3.7 - - PYTHON_VERSION=3.6 - - PKG_TEST_PYTHON="--test-python=py36 --test-python=py27" + - PYTHON_VERSION=3.7 + - PKG_TEST_PYTHON="--test-python=py37 --test-python=py27" - CHANS_DEV="-c pyviz/label/dev" - CHANS_REL="-c pyviz" - LABELS_DEV="--label dev" diff --git a/geoviews/tests/data/testmultigeominterface.py b/geoviews/tests/data/testmultigeominterface.py index 144c763f..cb0a34df 100644 --- a/geoviews/tests/data/testmultigeominterface.py +++ b/geoviews/tests/data/testmultigeominterface.py @@ -17,6 +17,11 @@ except: sgeom = None +try: + import spatialpandas +except: + spatialpandas = None + from geoviews.data.geom_dict import GeomDictInterface @@ -130,6 +135,11 @@ class SpatialPandasGeomInterfaceTest(GeomInterfaceTest): __test__ = True + def setUp(self): + if spatialpandas is None: + raise SkipTest('SpatialPandasInterface requires spatialpandas, skipping tests') + super(SpatialPandasGeomInterfaceTest, self).setUp() + class MultiGeomDictInterfaceTest(MultiBaseInterfaceTest): diff --git a/setup.py b/setup.py index 80b71b82..6dc9234b 100644 --- a/setup.py +++ b/setup.py @@ -148,6 +148,9 @@ def package_assets(example_path): 'xarray', ] +if sys.version_info.major > 2: + extras_require['examples'].append('spatialpandas') + # can only currently run all examples with packages from conda-forge _examples_extra = _recommended + [ 'iris',