Files
python-pyproj/python-pyproj.spec
Martin Pluskal c8c22ae793 Accepting request 980632 from home:LPechacek:python-pyproj331
With some delay, here comes the submission of the update to 3.3.1. I'd be happy for a review. Thanks!

- Update to 3.3.1
  * DOC: minor fix to crs doc-strings by @bjlittle in #1004
  * BUG: Correct type annotation for AreaofUse.bounds by
    @Kirill888 in #1013
  * BUG: crs.py: remove @AbstractMethod decorator by @hemberger
    in #1018
  * BUG: Reorder deps in show_versions for setuptools issue by
    @snowman2 in #1019
  * BUG: get_data_dir support for conda Windows enviroments by
    @snowman2 in #1030
  * ENH: warn when export of CRS returns None by @martinfleis
    in #1037
  * BUG: Complete database stub file with query_utm_crs_info()
    signature by @orontee in #1047
  * ENH: Added support for int-like strings and numpy dtypes by
    @iboates in #1049
  * BUG: Warn when CRS cannot be converted to PROJ or PROJ JSON
    by @snowman2 in #1054
  * ENH: Added support to pickle Transformer by @snowman2
    in #1060

OBS-URL: https://build.opensuse.org/request/show/980632
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/python-pyproj?expand=0&rev=43
2022-06-03 16:59:59 +00:00

112 lines
3.7 KiB
RPMSpec

#
# spec file for package python-pyproj
#
# 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/
#
%define skip_python2 1
%define skip_python36 1
%{?!python_module:%define python_module() python3-%{**}}
Name: python-pyproj
Version: 3.3.1
Release: 0
Summary: Python interface to PROJ library
License: SUSE-Public-Domain AND X11
Group: Development/Languages/Python
URL: https://github.com/pyproj4/pyproj
Source: https://files.pythonhosted.org/packages/source/p/pyproj/pyproj-%{version}.tar.gz
BuildRequires: %{python_module Cython >= 0.28.4}
BuildRequires: %{python_module Shapely}
BuildRequires: %{python_module aenum}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: proj
BuildRequires: proj-devel >= 8
BuildRequires: python-rpm-macros
Requires: python-aenum
Requires: python-numpy
Requires(post): update-alternatives
Requires(postun):update-alternatives
# SECTION test requirements
BuildRequires: %{python_module certifi}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module xarray}
# /SECTION
%python_subpackages
%description
Performs cartographic transformations and geodetic computations.
The Proj class can convert from geographic (longitude,latitude) to native map
projection (x,y) coordinates and vice versa, or from one map projection
coordinate system directly to another.
The Geod class can perform forward and inverse geodetic, or Great Circle,
computations. The forward computation involves determining latitude, longitude
and back azimuth of a terminus point given the latitude and longitude of an
initial point, plus azimuth and distance. The inverse computation involves
determining the forward and back azimuths and distance given the latitudes and
longitudes of an initial and terminus point.
Input coordinates can be given as python arrays, lists/tuples, scalars or
numpy/Numeric/numarray arrays. Optimized for objects that support the Python
buffer protocol (regular python and numpy array objects).
This project has a git repository https://github.com/pyproj4/pyproj
where you may access the most up-to-date source.
%prep
%setup -q -n pyproj-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pyproj
%python_expand rm -rf %{buildroot}%{$python_sitearch}/test
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
mv pyproj pyproj_temp
export PROJ_DIR=$(pkg-config --variable=libdir proj)
%{python_expand # Multiline
export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -c "import pyproj; pyproj.Proj(init='epsg:4269')"
}
# Reset to remove wrong flavor path from loop above
export PYTHONPATH=""
%pytest_arch -m "not network and not cli and not grid"
mv pyproj_temp pyproj
%post
%python_install_alternative pyproj
%postun
%python_uninstall_alternative pyproj
%files %{python_files}
%python_alternative %{_bindir}/pyproj
%license LICENSE
%doc README.md
%{python_sitearch}/pyproj
%{python_sitearch}/pyproj-%{version}*-info
%changelog