Name: ansible-review
Version: 0.13.7
Release: 1%{?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
# https://github.com/willthames/ansible-review/pull/66
Patch1: 0001-fix-TestDiffEncoding-when-run-in-C-locale.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-nose
Requires: ansible-lint >= 3.0
Requires: python-yaml
Requires: python-appdirs
Requires: python2-unidiff
Requires: /usr/bin/flake8
# Runtime requirements also needed in the build to run tests:
BuildRequires: ansible-lint >= 3.0
BuildRequires: python-yaml
BuildRequires: python-appdirs
BuildRequires: python2-unidiff
BuildRequires: /usr/bin/flake8
%description
Tool to review Ansible playbooks, roles, and inventory and suggest improvements.
%prep
%setup -q
%patch1 -p1
rm -r lib/ansible_review.egg-info
sed -e '1 { /^#!/d }' -i lib/ansiblereview/utils/yamlindent.py
# Upstream declares a Python-level dependency on flake8, so that when you
# "pip install ansible-review" you get a copy of flake8. But actually
# ansible-review only invokes the flake8 command as a subprocess, it doesn't
# import any flake8 Python modules. In Fedora 27+ the flake8 command is in
# Python 3 not Python 2, so if we have a Python-level dependency it won't
# necessarily be satisfied, leading to:
# pkg_resources.DistributionNotFound: The 'flake8' distribution was not found and is required by ansible-review
# So let's just edit that out.
sed -e "/install_requires=/s@'flake8'@@" -i setup.py
%build
%py2_build
%install
%py2_install
%check
nosetests -v test/
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{python2_sitelib}/ansiblereview
%{python2_sitelib}/ansible_review*.egg-info
%changelog
* Tue Jul 17 2018 Dan Callaghan <dcallagh@redhat.com> - 0.13.7-1
- upstream bug fix release 0.13.7:
https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0137
* 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