aekoroglu 5682bcf
%global srcname elasticsearch
aekoroglu 5682bcf
%global _desc %{expand: \
58fef6d
Low level client for Elasticsearch. It's goal is to provide common ground\
58fef6d
for all Elasticsearch-related code in Python. The client's features include:\
58fef6d
\
58fef6d
- Translating basic Python data types to and from json\
58fef6d
- Configurable automatic discovery of cluster nodes\
58fef6d
- Persistent connections\
58fef6d
- Load balancing (with pluggable selection strategy) across all available nodes\
aekoroglu 5682bcf
- Failed connection penalization (time based - failed connections wont be\
58fef6d
  retried until a timeout is reached)\
58fef6d
- Thread safety\
aekoroglu 5682bcf
- Pluggable architecture.}
b1297e0
aekoroglu 5682bcf
Name:		python-elasticsearch
aekoroglu 5682bcf
Version:	8.3.1
aekoroglu 5682bcf
Release:	%autorelease
aekoroglu 5682bcf
Summary:	Client for Elasticsearch
58fef6d
aekoroglu 5682bcf
License:	ASL 2.0
aekoroglu 5682bcf
URL:		https://github.com/elasticsearch/elasticsearch-py
aekoroglu 5682bcf
Source0:	%{url}/archive/v%{version}/%{srcname}-py-%{version}.tar.gz
58fef6d
aekoroglu 5682bcf
BuildArch:	noarch
1dce51a
aekoroglu 045618a
BuildRequires:	make
aekoroglu 5682bcf
BuildRequires:	python3-devel
aekoroglu 045618a
BuildRequires:	python3-sphinx_rtd_theme
1dce51a
aekoroglu 5682bcf
%description %{_desc}
aekoroglu 5682bcf
aekoroglu 5682bcf
%package -n python3-%{srcname}
aekoroglu 5682bcf
Summary:	Python 3 Client for Elasticsearch
aekoroglu 5682bcf
aekoroglu 5682bcf
%description -n python3-%{srcname} %{_desc}
1dce51a
aekoroglu 045618a
%package -n python-%{srcname}-doc
aekoroglu 045618a
Summary:    Documentation for Python Elasticsearch
aekoroglu 045618a
aekoroglu 045618a
%description -n python-%{srcname}-doc
aekoroglu 045618a
%{summary}
aekoroglu 045618a
b1297e0
%prep
aekoroglu 5682bcf
%autosetup -n %{srcname}-py-%{version}
aekoroglu 5682bcf
aekoroglu 10caef9
# remove very old missing dep
aekoroglu 10caef9
sed -i '/unasync/d' dev-requirements.txt
e35d9d9
# formatter used upstream to generate examples; we don’t need it
e35d9d9
sed -i '/black/d' dev-requirements.txt
aekoroglu 10caef9
aekoroglu 5682bcf
%generate_buildrequires
aekoroglu 10caef9
%pyproject_buildrequires -x extras dev-requirements.txt
b1297e0
b1297e0
%build
aekoroglu 5682bcf
%pyproject_wheel
b1297e0
aekoroglu 045618a
PYTHONPATH="%{pyproject_build_lib}" sphinx-build-3 docs/sphinx html
aekoroglu 045618a
# Remove the sphinx-build leftovers.
aekoroglu 045618a
rm -rf html/.{doctrees,buildinfo}
aekoroglu 045618a
b1297e0
%install
aekoroglu 5682bcf
%pyproject_install
aekoroglu 5682bcf
%pyproject_save_files %{srcname}
b1297e0
f3c4197
%check
aekoroglu 5682bcf
%pytest -v
f3c4197
aekoroglu 5682bcf
%files -n python3-%{srcname} -f %{pyproject_files}
aekoroglu 045618a
%doc CHANGELOG.md CONTRIBUTING.md README.rst
aekoroglu 045618a
aekoroglu 045618a
%files -n python-%{srcname}-doc
aekoroglu 045618a
%license LICENSE
aekoroglu 045618a
%doc html examples
b1297e0
b1297e0
%changelog
aekoroglu 5682bcf
%autochangelog