Files
python-pyproj/python-pyproj.spec
Bruno Friedmann 78b5afbad9 Accepting request 607623 from home:bruno_friedmann:branches:Application:Geo
We will certainly have to cleanup the python3 link
in App:Geo 

- Packaging : 
  + move to python singlespec
  + use %check and run unit tests for version >= 1500
  + spec-cleaner (date/license)
- update upstream release 1.9.5.1
  * fix for issue #42 compilation error with microsoft visual studio
  + 1.9.5
  * update proj4 source to latest github master commit 953cc00f
  * port of basemap fix for input arrays in fortran order 
  * restore inverse Hammer patch that was lost when proj4 source 
    code was updated.

OBS-URL: https://build.opensuse.org/request/show/607623
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/python-pyproj?expand=0&rev=4
2018-05-20 07:16:22 +00:00

94 lines
3.2 KiB
RPMSpec

#
# spec file for package python-pyproj
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pyproj
Version: 1.9.5.1
Release: 0
Summary: Python interface to PROJ4 library
License: SUSE-Public-Domain AND X11
Group: Development/Languages/Python
URL: https://github.com/jswhit/pyproj
Source: https://files.pythonhosted.org/packages/source/p/pyproj/pyproj-%{version}.tar.gz
# TODO : test it with external proj
# Do tests only for > 1500
%if 0%{suse_version} >= 1500
BuildRequires: %{python_module cov-core}
BuildRequires: %{python_module coverage} >= 4.0
BuildRequires: %{python_module nose2}
%endif
BuildRequires: %{python_module Cython} >= 0.23.5
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-numpy
%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/jswhit/pyproj
where you may access the most up-to-date source.
%prep
%setup -q -n pyproj-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%python_expand chmod -x %{buildroot}%{$python_sitearch}/pyproj/data/test*
%check
%if 0%{suse_version} >= 1500
%{python_expand # Multiline
export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -c "import pyproj; pyproj.test()"
$python -c "import pyproj; pyproj.Proj(init='epsg:4269')"
$python unittest/test.py -v
}
%endif
%files %{python_files}
%license LICENSE LICENSE_proj4
%doc README.md Changelog docs/*
%{python_sitearch}/*
%changelog