File ecmwfapi.spec of Package ecmwfapi
#
# spec file for package ecmwfapi
#
# Copyright (c) 2025 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/
#
#---not enough libraries available in Leap 15.5; python3 and >=python311 for 15.6
%if 0%{?sle_version} >= 150600 && 0%{?is_opensuse}
%{?sle15allpythons}
%endif
%define sourcename ecmwf-api-client
Name: ecmwfapi
Version: 1.6.5
Release: 0
Summary: ECMWF Web-API client
License: Apache-2.0
Group: Development/Libraries/Python
URL: https://pypi.org/project/ecmwf-api-client/
Source: https://github.com/ecmwf/ecmwf-api-client/archive/v%{version}.tar.gz#/%{sourcename}-%{version}.tar.gz
# PATCH-FEATURE-OPENSUSE sprinkle-flushes.patch
Patch0: sprinkle-flushes.patch
# PATCH-FEATURE-OPENSUSE use_curl.patch
Patch1: use_curl.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
Requires: curl
BuildArch: noarch
%python_subpackages
%description
Client library to request and retrieve datasets from ECMWF
%prep
%autosetup -p0 -n %{sourcename}-%{version}
%build
%python_build
%install
%python_install
%if 0%{?suse_version}
%python_expand %fdupes %{buildroot}%{$python_sitelib}/ecmwfapi
%endif
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/ecmwfapi
%{python_sitelib}/ecmwf_api_client-%{version}-py*.egg-info
%changelog