ansible-lint: Remove from python-modules

This is an application, not a library.

https://ansible-lint.readthedocs.io/usage/
This commit is contained in:
Martin Weinelt 2023-05-16 01:03:21 +02:00
parent b0a4b58495
commit 4a98f3a900
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
4 changed files with 10 additions and 30 deletions

View file

@ -1,33 +1,14 @@
{ lib
, buildPythonPackage
, python3
, fetchPypi
, setuptools
, setuptools-scm
, ansible-core
, black
, filelock
, flaky
, jsonschema
, packaging
, pythonOlder
, pytest-xdist
, pytestCheckHook
, pythonRelaxDepsHook
, pyyaml
, rich
, ruamel-yaml
, subprocess-tee
, wcmatch
, yamllint
, ansible
}:
buildPythonPackage rec {
python3.pkgs.buildPythonApplication rec {
pname = "ansible-lint";
version = "6.16.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-34Lzk18SCeMHRAjurl6DfM7G/VLB0xJmif9BJKuwpcs=";
@ -39,7 +20,7 @@ buildPythonPackage rec {
--replace "sys.exit(1)" ""
'';
nativeBuildInputs = [
nativeBuildInputs = with python3.pkgs; [
setuptools
setuptools-scm
pythonRelaxDepsHook
@ -49,7 +30,7 @@ buildPythonPackage rec {
"ruamel.yaml"
];
propagatedBuildInputs = [
propagatedBuildInputs = with python3.pkgs; [
# https://github.com/ansible/ansible-lint/blob/master/.config/requirements.in
ansible-core
black
@ -67,7 +48,7 @@ buildPythonPackage rec {
# tests can't be easily run without installing things from ansible-galaxy
doCheck = false;
nativeCheckInputs = [
nativeCheckInputs = with python3.pkgs; [
flaky
pytest-xdist
pytestCheckHook
@ -76,7 +57,7 @@ buildPythonPackage rec {
preCheck = ''
# ansible wants to write to $HOME and crashes if it can't
export HOME=$(mktemp -d)
export PATH=$PATH:${lib.makeBinPath [ ansible-core ]}
export PATH=$PATH:${lib.makeBinPath [ ansible ]}
# create a working ansible-lint executable
export PATH=$PATH:$PWD/src/ansiblelint
@ -102,7 +83,7 @@ buildPythonPackage rec {
"test_discover_lintables_umlaut"
];
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible-core ]}" ];
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible ]}" ];
meta = with lib; {
description = "Best practices checker for Ansible";

View file

@ -17567,7 +17567,7 @@ with pkgs;
ansible-later = with python3.pkgs; toPythonApplication ansible-later;
ansible-lint = with python3.pkgs; toPythonApplication ansible-lint;
ansible-lint = callPackage ../tools/admin/ansible/lint.nix { };
antlr2 = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };
antlr3_4 = callPackage ../development/tools/parsing/antlr/3.4.nix { };

View file

@ -36,6 +36,7 @@ mapAliases ({
abodepy = jaraco-abode; # added 2023-02-01
aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-30
ansible-lint = throw "ansible-lint has been promoted to a top-level attribute"; # Added 2023-05-16
anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
argon2_cffi = argon2-cffi; # added 2022-05-09
APScheduler = apscheduler; # added 2023-02-19

View file

@ -500,8 +500,6 @@ self: super: with self; {
ansible-later = callPackage ../development/python-modules/ansible-later { };
ansible-lint = callPackage ../development/python-modules/ansible-lint { };
ansible-runner = callPackage ../development/python-modules/ansible-runner { };
ansi = callPackage ../development/python-modules/ansi { };