%global commit @COMMIT@
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           ceph-medic
Version:        1.0.8
Release:        1%{?dist}.1
Summary:        Find common issues on Ceph clusters
License:        MIT
URL:            https://github.com/ceph/ceph-medic
Source0:        https://github.com/ceph/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python3-remoto
BuildRequires:  python%{python3_pkgversion}-mock
BuildRequires:  python3-tambo
Requires:       python3-remoto
Requires:       python3-tambo
Requires:       python3-execnet

BuildArch:      noarch


%description
An admin tool to determine common issues on Ceph storage clusters.

%prep
%autosetup -p1

%build
%{py3_build}

%install
%{py3_install}

%check
%if 0%{?rhel} >= 8
py.test-%{python3_version} -v ceph_medic/tests
%endif

%files
%license LICENSE
%doc README.rst
%{_bindir}/ceph-medic
%{python3_sitelib}/*

%changelog
* Tue Jul 21 2020 Jean-Marc Liger <ligenix@iscp.fr> - 1.0.8-1.1
- Rebuild for COPR EL7 and EL8

* Thu Jun 18 2020 Thomas Serlin <tserlin@redhat.com> 1.0.8-1
- Update to 1.0.8 (rhbz#1784801)
 
* Sat Mar 28 2020 Thomas Serlin <tserlin@redhat.com> - 1.0.7-1
- Update to 1.0.7 (rhbz#1784801)

* Wed Jan 08 2020 Thomas Serlin <tserlin@redhat.com> - 1.0.5-2
- Update Requires in spec file

* Thu Aug 08 2019 Thomas Serlin <tserlin@redhat.com> - 1.0.5-1
- Update to 1.0.5 (rhbz#1686710)

* Mon Apr 22 2019 Ken Dreyer <kdreyer@redhat.com> - 1.0.4-107.8553147
- update to latest master snapshot (8553147)

* Wed Sep 27 2017 Ken Dreyer <kdreyer@redhat.com> 1.0.4-1
- Update to 1.0.4 (rhbz#1493636)

* Tue Sep 19 2017 Ken Dreyer <kdreyer@redhat.com> 1.0.3-1
- Update to 1.0.3 (rhbz#1489447 rhbz#1489444)

* Thu Aug 17 2017 Ken Dreyer <kdreyer@redhat.com> 1.0.2-1
- Update to 1.0.2 (rhbz#1482579)

* Fri Jul 14 2017 Ken Dreyer <kdreyer@redhat.com> - 1.0.0-1
- initial el7 package