%if 0%{?fedora} >= 22 %bcond_without python3 %else %bcond_with python3 %endif %global srcname curator %global commit a928718f780af7b3b6de2e1cfd371f1c9168b727 Name: elastic-curator Version: 3.2.0 Release: 1%{?dist} Summary: Tools for managing Elasticsearch indices License: ASL 2.0 URL: https://github.com/elastic/curator Source0: https://github.com/elastic/curator/archive/%{commit}/%{srcname}-%{commit}.tar.gz Source1: curator.1 BuildArch: noarch %if %{with python3} BuildRequires: python3-click BuildRequires: python3-coverage BuildRequires: python3-devel BuildRequires: python3-elasticsearch BuildRequires: python3-mock BuildRequires: python3-nose #BuildRequires: python3-nose-xcover BuildRequires: python3-setuptools BuildRequires: python3-urllib3 Requires: python3-click Requires: python3-elasticsearch %else BuildRequires: python-coverage BuildRequires: python-click BuildRequires: python-devel BuildRequires: python-elasticsearch BuildRequires: python-mock BuildRequires: python-nose BuildRequires: python-nose-xcover BuildRequires: python-setuptools BuildRequires: python-urllib3 Requires: python-click Requires: python-elasticsearch %endif %description Tools for managing Elasticsearch indices. Curator performs many operations on your Elasticsearch indices, from delete to snapshot to shard allocation routing. %prep %setup -q -n %{srcname}-%{commit} rm -rf *.egg-info # don't run integration tests, they need a working ES instance rm -rf test/integration %build %if %{with python3} %{__python3} setup.py build %else %{__python2} setup.py build %endif %install %if %{with python3} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} %else %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %endif install -D -p -m0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/curator.1 %check %if %{with python3} %{__python3} setup.py test %else %{__python2} setup.py test %endif %files %doc Changelog.rst CONTRIBUTING.md CONTRIBUTORS README.md %license LICENSE.txt %{_bindir}/es_repo_mgr %{_bindir}/curator %{_mandir}/man1/curator.1* %if %{with python3} %{python3_sitelib}/%{srcname} %{python3_sitelib}/elasticsearch_curator-%{version}-py3.?.egg-info %else %{python2_sitelib}/%{srcname} %{python2_sitelib}/elasticsearch_curator-%{version}-py2.?.egg-info %endif %changelog * Thu Jul 2 2015 Piotr Popieluch - 3.2.0-1 - Update to 3.2.0 - Rewrite description - Remove mkdir in %%install - Add missing BuildRequires * Tue Jun 16 2015 Piotr Popieluch - 3.1.0-2 - Fix tests - Switch to python3 on f22 and higher * Tue May 26 2015 Piotr Popieluch - 3.1.0-1 - Update to 3.1.0 * Mon May 11 2015 Piotr Popieluch - 3.0.3-1 - Initial package