Files
python-Shapely/python-Shapely.spec
Martin Pluskal e0e34ddd59 Accepting request 945434 from home:bnavigator:branches:Application:Geo
- Update to 1.8.0
  * Shapely 1.8.0 is a transitional version. There are a few bug
    fixes and new features, but it largely exists to warn about the
    upcoming changes in 2.0.0. See the new migration guide for more
    details on how to update your code from Shapely 1.8 to 2.0.
  * Shapely 1.8.0 supports only Python versions >= 3.6. The release
    is compatible with GEOS versions 3.6-3.10.
  * Deprecations: The following functions and geometry attributes
    and methods will be removed in version 2.0.0.
    - ops.cascaded_union
    - BaseGeometry.empty
    - BaseGeometry.ctypes and __array_interface__
    - multi-part geometry __len__
    - setting custom attributes on geometry objects
    - BaseGeometry.almost_exact
    - Deprecation warnings will be emitted in 1.8.0 when any of
      these features are used. 
  * The deprecated to_wkb and to_wkt methods of BaseGeometry have
    been removed.
  * The STRtree nearest* methods now take an optional argument that
    specifies exclusion of the input geometry from results (#1115).
  * A GeometryTypeError has been added to shapely.errors and is
    consistently raised instead of TypeError or ValueError as in
    version 1.7. For backwards compatibility, the new exception
    will derive from TypeError and Value error until version 2.0
    (#1099).
  * The STRtree class constructor now takes an optional second
    argument, a sequence of objects to be stored in the tree. If
    not provided, the sequence indices of the geometries will be
    stored, as before (#1112).
  * The STRtree class has new query_geoms, query_items,
    nearest_geom, and nearest_item methods (#1112). The query and
    nearest methods remain as aliases for query_geoms and
    nearest_geom.
  * A normalize method has been added to geometry classes, exposing
    the GEOSNormalize algorithm (#1090).
  * STRtree instances have a new default capacity of 10 items per
    node (#1070).
  * The new shapely.ops.voronoi_diagram computes the Voronoi
    Diagram of a geometry or geometry collection (#833, #851).
  * shapely.validation.make_valid fixes invalid geometries (#883).
- Drop Shapely-fix-svg-collection-pr1042.patch

OBS-URL: https://build.opensuse.org/request/show/945434
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/python-Shapely?expand=0&rev=25
2022-01-13 09:39:09 +00:00

87 lines
2.8 KiB
RPMSpec

#
# spec file for package python-Shapely
#
# Copyright (c) 2022 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
%bcond_without test
%define skip_python2 1
Name: python-Shapely
Version: 1.8.0
Release: 0
Summary: Geospatial geometries, predicates, and operations
License: BSD-3-Clause
URL: https://github.com/Toblerity/Shapely
Source: https://files.pythonhosted.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz
BuildRequires: %{python_module Cython >= 0.19}
BuildRequires: %{python_module devel >= 3.6}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: geos-devel >= 3.3
BuildRequires: python-rpm-macros
%if 0%{?suse_version} > 1320
BuildRequires: %{python_module matplotlib}
%endif
Requires: geos >= 3.3
Recommends: python-numpy
Provides: python-shapely = %{version}
Obsoletes: python-shapely < %{version}
%python_subpackages
%description
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,
but can be readily integrated with packages that are like WorldMill
and pyproj.
%prep
%autosetup -p1 -n Shapely-%{version}
%build
CFLAGS="%{optflags} `geos-config --cflags` LDFLAGS=`geos-config --clibs`"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
# Those are just needed to build cython extension
# Not for distribute
rm -fv %{buildroot}%{_prefix}/shapely/_geos.pxi
rm -frv %{buildroot}%{_prefix}/shapely
%python_expand rm %{buildroot}%{$python_sitearch}/shapely/*/*.c
%check
# 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
%doc CREDITS.txt README.rst docs/*
%{python_sitearch}/shapely
%{python_sitearch}/Shapely-%{version}*-info
%changelog