diff --git a/python-cartopy.spec b/python-cartopy.spec index 5635b91..ba2106f 100644 --- a/python-cartopy.spec +++ b/python-cartopy.spec @@ -1,6 +1,9 @@ %global srcname cartopy %global Srcname Cartopy +# Some tests use the network. +%bcond_with network + Name: python-%{srcname} Version: 0.17.0 Release: 4%{?dist} @@ -113,8 +116,13 @@ done %check +%if %{with network} +PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 MPLBACKEND=Agg \ + pytest-3 --doctest-modules --pyargs cartopy +%else PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 MPLBACKEND=Agg \ pytest-3 --doctest-modules --pyargs cartopy -m "not network" +%endif %files -n python-%{srcname}-common