File opensearch-py.spec of Package opensearch-py

#
# spec file for package opensearch-py
#
# 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 name opensearch-py
%define version 2.7.1
%define release 1
Name:           %{name}
Version:        %{version}
Release:        %{release}
Summary:        Python client for OpenSearch
License:        Apache-2.0
URL:            https://github.com/opensearch-project/opensearch-py
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildArch:      noarch

%description
Python client for OpenSearch.

%package -n python3-opensearch
Summary:        Python client for OpenSearch
Requires:       python3-certifi
Requires:       python3-urllib3

%description -n python3-opensearch
Python client for OpenSearch.

%prep
%autosetup -n opensearch-py-%{version}

%build
%py3_build

%install
%py3_install
rm -rf %{buildroot}%{_prefix}/lib/python*/site-packages/*.egg-info/requires.txt
rm -rf %{buildroot}%{_datadir}/doc/%{name}/

%fdupes %{buildroot}%{_prefix}/lib/python*/site-packages

%files -n python3-opensearch
%{python3_sitelib}/opensearchpy/
%{python3_sitelib}/opensearch_py*.egg-info

%changelog
openSUSE Build Service is sponsored by