diff --git a/python-Shapely.changes b/python-Shapely.changes index 3a39d01..2a8e4ea 100644 --- a/python-Shapely.changes +++ b/python-Shapely.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Apr 17 10:55:16 UTC 2021 - Ben Greiner + +- Don't use and test NumPy for python36 flavor: not available on + Tumbleweed (NEP29) +- Make sure to test shapely.vectorized on remaining flavors by + changing the working dir. + ------------------------------------------------------------------- Sat Jan 9 20:58:53 UTC 2021 - Benjamin Greiner diff --git a/python-Shapely.spec b/python-Shapely.spec index 5b86b5f..a41ebf2 100644 --- a/python-Shapely.spec +++ b/python-Shapely.spec @@ -31,19 +31,24 @@ Source: https://files.pythonhosted.org/packages/source/S/Shapely/Shapely Patch0: Shapely-fix-svg-collection-pr1042.patch BuildRequires: %{python_module Cython >= 0.19} BuildRequires: %{python_module devel} -BuildRequires: %{python_module numpy-devel} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: geos-devel >= 3.3 BuildRequires: python-rpm-macros -Requires: geos >= 3.3 -Recommends: python-numpy -# SECTION test requirements -BuildRequires: %{python_module pytest} +%if 0%{suse_version} >= 1550 +BuildRequires: %{python_module matplotlib if (%python-base without python36-base)} +BuildRequires: %{python_module numpy-devel if (%python-base without python36-base)} +%else +# Application:Geo does not have the support for boolean build requirements within the +# python_module macro for the SLE/Leap repos +BuildRequires: %{python_module numpy-devel} %if 0%{?suse_version} > 1320 BuildRequires: %{python_module matplotlib} %endif -# /SECTION +%endif +Requires: geos >= 3.3 +Recommends: python-numpy Provides: python-shapely = %{version} Obsoletes: python-shapely < %{version} %python_subpackages @@ -71,9 +76,15 @@ CFLAGS="%{optflags} `geos-config --cflags` LDFLAGS=`geos-config --clibs`" # Not for distribute rm -fv %{buildroot}%{_prefix}/shapely/_geos.pxi rm -frv %{buildroot}%{_prefix}/shapely +%python_expand rm %{buildroot}%{$python_sitearch}/shapely/*/*.c %check -%pytest_arch +# make sure not to import the source dir without compiled shapely.vectorized during tests +mkdir testenv +cp -r tests setup.cfg testenv +pushd testenv +%pytest_arch -ra +popd %files %{python_files} %license LICENSE.txt