File python-GeoAlchemy2.spec of Package python-GeoAlchemy2
#
# spec file for package python-GeoAlchemy2
#
# Copyright (c) 2017 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-GeoAlchemy2
Version: 0.4.0
Release: 0
Url: http://geoalchemy.org/
Summary: Spatial Database toolkit based on SQLAlchemy
License: MIT
Group: Development/Languages/Python
Source0: https://files.pythonhosted.org/packages/source/G/GeoAlchemy2/GeoAlchemy2-%{version}.tar.gz
#Missing license file in tar.gz
Source1: https://raw.githubusercontent.com/geoalchemy/geoalchemy2/master/COPYING.rst
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module SQLAlchemy} >= 0.9
# Test requirements: there's no upstream tests in pypi tar.
Requires: python-SQLAlchemy >= 0.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
GeoAlchemy2 is a Python toolkit for working with spatial databases. It is
based on the gorgeous SQLAlchemy.
Documentation is on Read the Docs: http://geoalchemy-2.rtfd.org.
GeoAlchemy2 focuses on PostgreSQL/PostGIS only.
PostGIS 1.5 and PostGIS 2 are supported.
GeoAlchemy 2 aims to be simpler than its predecessor, GeoAlchemy.
Simpler to use, and simpler to maintain.
%prep
%setup -q -n GeoAlchemy2-%{version}
cp %{S:1} COPYING.rst
%build
%python_build
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%files %python_files
%defattr(-,root,root,-)
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
%license COPYING.rst
%else
%doc COPYING.rst
%endif
%doc README.rst
%{python_sitelib}/*
%changelog