File python-sat-stac.spec of Package python-sat-stac

# spec file for package python-sat-stac
# Copyright (c) 2020 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

%define packagename sat-stac
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-sat-stac
Version:        0.4.0
Release:        0
Summary:        A library for reading and working with Spatio-Temporal Asset Catalogs
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module python-dateutil >= 2.7.5}
BuildRequires:  %{python_module requests >= 2.19.1}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-python-dateutil >= 2.7.5
Requires:       python-requests >= 2.19.1
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch

Sat-search is a Python 3 library and a command line tool for discovering
and downloading publicly available satellite imagery using a conformant
API such as sat-api.

%setup -q -n %{packagename}-%{version}


for p in %{packagename} ; do
    %python_clone -a %{buildroot}%{_bindir}/$p

%python_expand %fdupes %{buildroot}%{$python_sitearch}
%prepare_alternative %{packagename}

%python_install_alternative %{packagename}

%python_uninstall_alternative %{packagename}

# This archive does not have test files.
# The archive in github has it, but need network connection for test.

%files %{python_files}
%python_alternative %{_bindir}/%{packagename}