forked from pool/ansible-lint
0f85d833a3
- Recognize import_role and import_role when using fqcn (#2034) - Adds more yamllint configuration paths (#2032) - Allow normpath accept empty strings (#2028) Fixes bug where calling ansible-lint with "" as an argument, it will raise an exception. We can assume that empty string is the same as ".", especially as we also allow no arguments which are almost always treated as current directory too. - Remove ref to archived toolbox image from docs (#2026) - `--write`: Add `MatchError.yaml_path` for transforms (#2025) - --write: Avoid line-wrapping YAML flow objects (#2022) - --write: Introduce TransformMixin for Rules (#2023) - Avoid processing files under templates (#2021) - Add YAML path (to play/task) discovery utils for Transforms to use (#1970) - Recognize import_tasks with file key (#2019) - Allow import_playbook from collections (#2018) - Use ansible-compat cache directory (#2016) Ensures that we use the same cache_dir as ansible-compat. - Update to version 6.0.0: - Major Changes - Remove support for ansible 2.9 (#1880) @ssbarnea - Remove support for py36 and py37 (#1850) @ssbarnea - Made fqcn-builtins rule implicit (#1908) @ssbarnea - Removed --parseable-severity feature (#1898) @ssbarnea - Clarify GPLv3 license of the distribution (#1882) @ssbarnea - Made ansible-core a direct dependency (#1888) @ssbarnea - Made yamllint a direct dependency (#1881) @ssbarnea - Rename prerun submodule to _mockings (#1972) @ssbarnea - Remove unused code from prerun submodule (#1971) @ssbarnea OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ansible-lint?expand=0&rev=10
100 lines
3.8 KiB
RPMSpec
100 lines
3.8 KiB
RPMSpec
#
|
|
# spec file for package ansible-lint
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global lib_name ansiblelint
|
|
%{?python_enable_dependency_generator}
|
|
Name: ansible-lint
|
|
Version: 6.0.2
|
|
Release: 1%{?dist}
|
|
Summary: Best practices checker for Ansible
|
|
License: MIT
|
|
URL: https://github.com/ansible-community/ansible-lint
|
|
Source0: https://github.com/ansible-community/ansible-lint/archive/v%{version}/ansible-lint-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: python3-PyYAML
|
|
BuildRequires: python3-pip
|
|
BuildRequires: python3-six
|
|
BuildRequires: python3-wheel
|
|
# SECTION tests
|
|
BuildRequires: python3-pytest-xdist
|
|
BuildRequires: python3-flaky
|
|
BuildRequires: python3-packaging
|
|
BuildRequires: python3-tenacity
|
|
BuildRequires: python3-yamllint >= 1.25.0
|
|
#BuildRequires: git
|
|
BuildRequires: python3-enrich >= 1.2.6
|
|
BuildRequires: python3-ansible-compat >= 2.0.2
|
|
BuildRequires: python3-black
|
|
BuildRequires: python3-flake8
|
|
BuildRequires: python3-mypy
|
|
BuildRequires: python3-pylint
|
|
BuildRequires: python3-pytest-cov
|
|
BuildRequires: python3-rich >= 9.5.1
|
|
BuildRequires: python3-ruamel.yaml >= 0.15.37
|
|
BuildRequires: python3-wcmatch >= 7.0
|
|
# /SECTION
|
|
BuildRequires: ansible >= 2.12
|
|
BuildRequires: fdupes
|
|
Requires: ansible >= 2.12
|
|
Requires: ansiblec-compat >= 2.0.2
|
|
Requires: python3-PyYAML
|
|
Requires: python3-enrich >= 1.2.6
|
|
Requires: python3-packaging
|
|
Requires: python3-rich >= 9.5.1
|
|
Requires: python3-ruamel.yaml >= 0.15.37
|
|
Requires: python3-six
|
|
Requires: python3-tenacity
|
|
Requires: python3-wcmatch >= 7.0
|
|
Requires: python3-yamllint >= 1.25.0
|
|
|
|
%description
|
|
Checks playbooks for practices and behavior that could potentially be improved.
|
|
|
|
%prep
|
|
%setup -n ansible-lint-%{version}
|
|
sed -ri 's/(\[metadata\])/\1\nversion = %{version}/' setup.cfg
|
|
sed -i '1{/\/usr\/bin\/env python/d;}' src/ansiblelint/__main__.py
|
|
|
|
%build
|
|
python3 -mpip wheel --no-deps --disable-pip-version-check --use-pep517 --no-build-isolation --progress-bar off --verbose . -w build/
|
|
|
|
%install
|
|
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}
|
|
|
|
%fdupes -s %{buildroot}/%{python3_sitelib}
|
|
|
|
%check
|
|
# exclude some tests depending on internet access (galaxy modules)
|
|
# exclude test_cli_auto_detect which depends on a local git repository
|
|
# exclude test_co and test_call_from_outside_venv because of https://github.com/ansible-community/ansible-lint/issues/1885
|
|
PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}%{buildroot}/%{python3_sitelib} PATH=${PATH:+$PATH:}%{buildroot}/%{_bindir} PYTHONDONTWRITEBYTECODE=1 pytest -v -k 'not (test_prerun_reqs_v1 or test_prerun_reqs_v2 or test_install_collection or test_require_collection_wrong_version or test_cli_auto_detect or test_eco or test_call_from_outside_venv)'
|
|
|
|
%files
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{_bindir}/ansible-lint
|
|
%{python3_sitelib}/%{lib_name}/
|
|
%{python3_sitelib}/ansible_lint-%{version}.dist-info/
|
|
|
|
%changelog
|