Blob Blame History Raw
Name:           ansible-review
Version:        0.13.4
Release:        2%{?dist}
Summary:        Reviews Ansible playbooks, roles and inventory and suggests improvements
License:        MIT
URL:            https://github.com/willthames/ansible-review
Source0:        https://files.pythonhosted.org/packages/source/a/%{name}/%{name}-%{version}.tar.gz
BuildArch:      noarch

%global _description\
Tool to review Ansible playbooks, roles, and inventory and suggest improvements.

%description %_description

%package -n python2-%{name}

Summary:        %summary
BuildRequires:  python2-devel
BuildRequires:  python2-nose
Requires:       python2-ansible-lint >= 3.4.19-2
Requires:       python2-yaml
Requires:       python2-appdirs
Requires:       python2-unidiff
Requires:       python2-flake8
# Runtime requirements also needed in the build to run tests:
BuildRequires:  python2-ansible-lint >= 3.4.19-2
BuildRequires:  python2-yaml
BuildRequires:  python2-appdirs
BuildRequires:  python2-unidiff
BuildRequires:  python2-flake8
%{?python_provide:%python_provide python2-%{name}}
Provides:       %{name} = %{version}-%{release}
Obsoletes:      %{name} < 0.13.4-2

%description  -n python2-%{name} %_description

%package -n python3-%{name}

Summary:        %summary
BuildRequires:  python3-devel
BuildRequires:  python3-nose
Requires:       python3-ansible-lint >= 3.4.19-2
Requires:       python3-yaml
Requires:       python3-appdirs
Requires:       python3-unidiff
Requires:       python3-flake8
# Runtime requirements also needed in the build to run tests:
BuildRequires:  python3-ansible-lint >= 3.4.19-2
BuildRequires:  python3-yaml
BuildRequires:  python3-appdirs
BuildRequires:  python3-unidiff
BuildRequires:  python3-flake8
%{?python_provide:%python_provide python3-%{name}}

%description  -n python3-%{name} %_description

%prep
%autosetup

# Python 3 compatibility fix
# https://github.com/willthames/ansible-review/pull/40
# Should be removed in the next version > 0.13.4
sed -e "64s/except AnsibleError, e:/except AnsibleError as e:/" -i lib/ansiblereview/groupvars.py

%build
%py2_build
%py3_build

%install
%py3_install
# Rename Python 3 executable file
mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-3

%py2_install

%check
nosetests-%{python2_version} -v test/
nosetests-%{python3_version} -v test/

%files -n python2-%{name}
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{python2_sitelib}/ansiblereview
%{python2_sitelib}/ansible_review*.egg-info

%files -n python3-%{name}
%license LICENSE
%doc README.md
%{_bindir}/%{name}-3
%{python3_sitelib}/ansiblereview
%{python3_sitelib}/ansible_review*.egg-info

%changelog
* Mon Dec 18 2017 Jan Beran <jberan@redhat.com> - 0.13.4-2
- Python 2 binary package renamed to python2-ansible-review
- Python 3 subpackage

* Tue Oct 03 2017 Dan Callaghan <dcallagh@redhat.com> - 0.13.4-1
- upstream bug fix release 0.13.4, with ansible 2.4 compatibility:
  https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0134

* Wed Jul 26 2017 Dan Callaghan <dcallagh@redhat.com> - 0.13.0-5
- depend on flake8 binary not package

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jan 10 2017 Timo Trinks <ttrinks@redhat.com> - 0.13.0-2
- RHBZ#1410896: depend on python-flake8

* Wed Dec 21 2016 Timo Trinks <ttrinks@redhat.com> - 0.13.0-1
- upstream release 0.13.0:
  https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0130

* Tue Nov 08 2016 Timo Trinks <ttrinks@redhat.com> - 0.12.2-1
- upstream bug fix release 0.12.2:
  https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0122

* Wed Aug 24 2016 Dan Callaghan <dcallagh@redhat.com> - 0.10.1-1
- upstream bug fix release 0.10.1:
  https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0101

* Wed Aug 24 2016 Dan Callaghan <dcallagh@redhat.com> - 0.10.0-1
- upstream release 0.10.0:
  https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0100

* Mon Aug 01 2016 Dan Callaghan <dcallagh@redhat.com> - 0.9.0-1
- upstream release 0.9.0
- use %%license properly

* Wed Jun 29 2016 Dan Callaghan <dcallagh@redhat.com> - 0.7.5-1
- updated to upstream release 0.7.5
- depend on ansible-lint >= 3.0, removed patch for 2.x compatibility

* Wed Jun 22 2016 Dan Callaghan <dcallagh@redhat.com> - 0.7.2-1
- initial version