2012-03-27 06:58:29 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-Shapely
|
|
|
|
|
#
|
2023-09-23 09:18:13 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-03-27 06:58:29 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
2012-11-25 13:03:48 +00:00
|
|
|
|
2019-01-08 11:25:56 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-27 06:58:29 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-Shapely
|
2023-09-23 09:18:13 +00:00
|
|
|
Version: 2.0.1
|
2012-03-27 06:58:29 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Geospatial geometries, predicates, and operations
|
2012-11-25 13:03:48 +00:00
|
|
|
License: BSD-3-Clause
|
2022-06-20 11:44:07 +00:00
|
|
|
URL: https://github.com/shapely/shapely
|
2023-09-23 09:18:13 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/shapely/shapely-%{version}.tar.gz
|
|
|
|
|
BuildRequires: %{python_module Cython >= 0.29 with %python-Cython < 3}
|
|
|
|
|
BuildRequires: %{python_module devel >= 3.8}
|
|
|
|
|
BuildRequires: %{python_module numpy-devel >= 1.16}
|
|
|
|
|
BuildRequires: %{python_module pip}
|
2017-07-17 07:08:51 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-09-23 09:18:13 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
|
|
|
|
# SECTION test
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module matplotlib}
|
|
|
|
|
# /SECTION
|
2017-07-17 07:08:51 +00:00
|
|
|
BuildRequires: fdupes
|
2022-06-20 11:44:07 +00:00
|
|
|
BuildRequires: geos-devel >= 3.5
|
2017-07-17 07:08:51 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-06-20 11:44:07 +00:00
|
|
|
# Shapely calls the GEOS libs libgeos and libgeos_c via ctypes in python scripts, undetected by rpm ld analyzer.
|
|
|
|
|
# (libgeos_c1 is detected due to some Cython optimized lib, but libgeos3 is not)
|
|
|
|
|
# use requires_eq in order to be detectable by the python_subpackages rewriter
|
|
|
|
|
%requires_eq %(rpm -q --requires geos-devel | grep libgeos)
|
2023-09-23 09:18:13 +00:00
|
|
|
Requires: python-numpy >= 1.16
|
2022-06-20 11:44:07 +00:00
|
|
|
Provides: python-shapely = %{version}-%{release}
|
|
|
|
|
Obsoletes: python-shapely < %{version}-%{release}
|
2017-07-17 07:08:51 +00:00
|
|
|
%python_subpackages
|
2012-03-27 06:58:29 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-07-17 07:08:51 +00:00
|
|
|
Shapely is a Python package for manipulation and analysis of
|
|
|
|
|
planar geometric objects. It is based on the GEOS (the
|
|
|
|
|
engine of PostGIS) and JTS (from which GEOS is ported) libraries.
|
|
|
|
|
Shapely is not concerned with data formats or coordinate systems,
|
2015-05-25 09:14:13 +00:00
|
|
|
but can be readily integrated with packages that are like WorldMill
|
|
|
|
|
and pyproj.
|
2012-03-27 06:58:29 +00:00
|
|
|
|
|
|
|
|
%prep
|
2023-09-23 09:18:13 +00:00
|
|
|
%autosetup -p1 -n shapely-%{version}
|
2012-03-27 06:58:29 +00:00
|
|
|
|
|
|
|
|
%build
|
2015-05-25 09:14:13 +00:00
|
|
|
CFLAGS="%{optflags} `geos-config --cflags` LDFLAGS=`geos-config --clibs`"
|
2023-09-23 09:18:13 +00:00
|
|
|
%pyproject_wheel
|
2012-03-27 06:58:29 +00:00
|
|
|
|
|
|
|
|
%install
|
2023-09-23 09:18:13 +00:00
|
|
|
%pyproject_install
|
2017-07-17 07:08:51 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2012-03-27 06:58:29 +00:00
|
|
|
|
2015-05-25 09:14:13 +00:00
|
|
|
%check
|
2021-04-19 07:14:14 +00:00
|
|
|
# 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
|
2012-03-27 06:58:29 +00:00
|
|
|
|
2017-07-17 07:08:51 +00:00
|
|
|
%files %{python_files}
|
2020-03-10 17:37:58 +00:00
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc CREDITS.txt README.rst docs/*
|
2021-01-04 07:37:18 +00:00
|
|
|
%{python_sitearch}/shapely
|
2023-09-23 09:18:13 +00:00
|
|
|
%{python_sitearch}/shapely-%{version}.dist-info
|
2012-03-27 06:58:29 +00:00
|
|
|
|
|
|
|
|
%changelog
|