2018-09-11 11:52:10 +02:00
|
|
|
#
|
|
|
|
# spec file for package ansible-lint
|
|
|
|
#
|
2022-02-15 18:15:02 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2018-09-11 11:52:10 +02:00
|
|
|
# Copyright 2018 by Lars Vogdt
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2022-02-15 18:15:02 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-09-11 11:52:10 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-09-10 08:42:53 +02:00
|
|
|
%global lib_name ansiblelint
|
2022-02-01 21:07:40 +01:00
|
|
|
%{?python_enable_dependency_generator}
|
2022-02-15 18:15:02 +01:00
|
|
|
Name: ansible-lint
|
2022-11-01 08:20:10 +01:00
|
|
|
Version: 6.8.5
|
2022-07-28 22:37:26 +02:00
|
|
|
Release: 0%{?dist}
|
2022-02-15 18:15:02 +01:00
|
|
|
Summary: Best practices checker for Ansible
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/ansible-community/ansible-lint
|
2022-10-06 09:24:46 +02:00
|
|
|
Source0: https://github.com/ansible-community/ansible-lint/archive/v%{version}/ansible-lint-%{version}.tar.gz#/ansible-lint-%{version}.tar.gz
|
2022-02-15 18:15:02 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
BuildRequires: python3-wheel
|
2022-10-06 11:27:43 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
|
|
|
# https://github.com/ansible/ansible-lint/blob/main/setup.cfg#L98
|
2022-02-01 21:07:40 +01:00
|
|
|
# SECTION tests
|
2022-10-06 11:27:43 +02:00
|
|
|
BuildRequires: python3-flaky >= 3.7.0
|
|
|
|
BuildRequires: python3-pytest-cov
|
|
|
|
BuildRequires: python3-pytest-xdist >= 2.1.0
|
|
|
|
BuildRequires: python3-psutil
|
|
|
|
BuildRequires: python3-black >= 22.1.0
|
2022-07-21 19:55:21 +02:00
|
|
|
BuildRequires: python3-mypy
|
|
|
|
BuildRequires: python3-pylint
|
2022-10-06 11:27:43 +02:00
|
|
|
BuildRequires: python3-flake8
|
|
|
|
# /SECTION
|
|
|
|
|
|
|
|
# Add runtime requirements (unless required for tests)
|
|
|
|
# to make sure this only builds if they are present
|
|
|
|
BuildRequires: ansible-core >= 2.12
|
|
|
|
BuildRequires: python3-ansible-compat >= 2.2.1
|
|
|
|
BuildRequires: python3-enrich >= 1.2.6
|
|
|
|
BuildRequires: python3-jsonschema >= 4.9.0
|
|
|
|
BuildRequires: python3-packaging
|
|
|
|
BuildRequires: python3-PyYAML
|
2022-02-15 18:15:02 +01:00
|
|
|
BuildRequires: python3-rich >= 9.5.1
|
|
|
|
BuildRequires: python3-ruamel.yaml >= 0.15.37
|
2022-10-06 11:27:43 +02:00
|
|
|
BuildRequires: python3-six
|
|
|
|
BuildRequires: python3-tenacity
|
2022-02-15 18:15:02 +01:00
|
|
|
BuildRequires: python3-wcmatch >= 7.0
|
2022-10-06 11:27:43 +02:00
|
|
|
BuildRequires: python3-yamllint >= 1.25.0
|
|
|
|
|
|
|
|
# https://github.com/ansible/ansible-lint/blob/main/setup.cfg#L69
|
2022-07-21 19:55:21 +02:00
|
|
|
Requires: ansible-core >= 2.12
|
2022-10-06 11:27:43 +02:00
|
|
|
Requires: python3-ansible-compat >= 2.2.1
|
|
|
|
Requires: python3-black >= 22.1.0
|
2022-02-15 18:15:02 +01:00
|
|
|
Requires: python3-enrich >= 1.2.6
|
2022-10-06 11:27:43 +02:00
|
|
|
Requires: python3-jsonschema >= 4.9.0
|
2022-02-15 18:15:02 +01:00
|
|
|
Requires: python3-packaging
|
2022-10-06 11:27:43 +02:00
|
|
|
Requires: python3-PyYAML
|
2022-02-15 18:15:02 +01:00
|
|
|
Requires: python3-rich >= 9.5.1
|
|
|
|
Requires: python3-ruamel.yaml >= 0.15.37
|
|
|
|
Requires: python3-six
|
|
|
|
Requires: python3-tenacity
|
|
|
|
Requires: python3-wcmatch >= 7.0
|
2022-07-21 19:55:21 +02:00
|
|
|
Requires: python3-yamllint >= 1.25.0
|
2017-09-10 08:42:53 +02:00
|
|
|
|
|
|
|
%description
|
2022-02-01 21:07:40 +01:00
|
|
|
Checks playbooks for practices and behavior that could potentially be improved.
|
2017-09-10 08:42:53 +02:00
|
|
|
|
|
|
|
%prep
|
2022-10-06 09:24:46 +02:00
|
|
|
%setup -n %{name}-%{version}
|
2022-02-01 21:07:40 +01:00
|
|
|
sed -ri 's/(\[metadata\])/\1\nversion = %{version}/' setup.cfg
|
|
|
|
sed -i '1{/\/usr\/bin\/env python/d;}' src/ansiblelint/__main__.py
|
2017-09-10 08:42:53 +02:00
|
|
|
|
|
|
|
%build
|
2022-02-01 21:07:40 +01:00
|
|
|
python3 -mpip wheel --no-deps --disable-pip-version-check --use-pep517 --no-build-isolation --progress-bar off --verbose . -w build/
|
2017-09-10 08:42:53 +02:00
|
|
|
|
|
|
|
%install
|
2022-02-01 21:07:40 +01:00
|
|
|
python3 -mpip install --root %{buildroot} --disable-pip-version-check --no-compile --no-deps --progress-bar off build/ansible_lint-*.whl
|
|
|
|
find %{buildroot}/%{python3_sitelib} -name '*.pyc' -delete
|
|
|
|
python3 -m compileall %{buildroot}/%{python3_sitelib}
|
|
|
|
python3 -O -m compileall %{buildroot}/%{python3_sitelib}
|
2017-09-10 08:42:53 +02:00
|
|
|
|
2022-02-01 21:07:40 +01:00
|
|
|
%fdupes -s %{buildroot}/%{python3_sitelib}
|
2017-09-10 08:42:53 +02:00
|
|
|
|
2022-02-01 21:07:40 +01:00
|
|
|
%files
|
2022-07-21 19:55:21 +02:00
|
|
|
%doc README.md
|
|
|
|
%license COPYING
|
2022-02-01 21:07:40 +01:00
|
|
|
%{_bindir}/ansible-lint
|
|
|
|
%{python3_sitelib}/%{lib_name}/
|
|
|
|
%{python3_sitelib}/ansible_lint-%{version}.dist-info/
|
2017-09-10 08:42:53 +02:00
|
|
|
|
|
|
|
%changelog
|