ansible-lint/ansible-lint.spec
Lars Vogdt fe16452fea - update to 3.4.21:
+ Update test that allows directories to have execute but not 
    read bit set
  + new playbook_import statement is now also recognized
  + Allow directories to have execute but not read bit set
  + Update test coverage
  + Fix typos in rules description
  + Fix normal sentence seen as title
  + ansible-lint accepts multiple playbooks in cmdlne

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ansible-lint?expand=0&rev=3
2018-05-07 11:10:11 +00:00

57 lines
1.4 KiB
RPMSpec

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global lib_name ansiblelint
Name: ansible-lint
Version: 3.4.21
Release: 1%{?dist}
Summary: Best practices checker for Ansible
License: MIT
URL: https://github.com/willthames/ansible-lint
Source0: https://github.com/willthames/ansible-lint/archive/v%{version}/ansible-lint-%{version}.tar.gz
BuildArch: noarch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: ansible
BuildRequires: python-rpm-macros
BuildRequires: fdupes
Requires: ansible
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Checks playbooks for practices and behavior that could potentially be improved
%prep
%autosetup -n ansible-lint-%{version}
rm -rf *.egg-info
#find -name '*.py' | xargs sed -i '1s|^#!python|#!%%{__python2}|'
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/ansible-lint
%python_expand %fdupes -s %{buildroot}/%{$python_sitelib}
%post
%python_install_alternative ansible-lint
%postun
%python_uninstall_alternative ansible-lint
%check
PYTHONPATH=%{buildroot}%{python2_sitelib} %__python setup.py test
%files %python_files
%defattr(-,root,root,-)
%doc README.md
%python_alternative %{_bindir}/ansible-lint
%{python_sitelib}/*
%changelog