python39Packages.ansible-lint: 5.3.2 -> 6.0.2
This commit is contained in:
parent
3057fe56eb
commit
9fd8faf824
|
@ -1,49 +1,58 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, isPy27
|
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, ansible-base
|
, ansible-compat
|
||||||
|
, ansible-core
|
||||||
, enrich
|
, enrich
|
||||||
, flaky
|
, flaky
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, rich
|
, rich
|
||||||
, ruamel-yaml
|
, ruamel-yaml
|
||||||
, tenacity
|
|
||||||
, wcmatch
|
, wcmatch
|
||||||
, yamllint
|
, yamllint
|
||||||
|
, pythonOlder
|
||||||
, pytest-xdist
|
, pytest-xdist
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible-lint";
|
pname = "ansible-lint";
|
||||||
version = "5.3.2";
|
version = "6.0.2";
|
||||||
disabled = isPy27;
|
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-m6iG20xE5ZNgvI1mjwvq5hk8Ch/LuedhJwAMo6ztfCg=";
|
sha256 = "sha256-tTm8ItE+beDMLiV1jh0osrwBVhpBSuN87aNwi1oqee0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# it is fine if lint tools are missing
|
||||||
|
substituteInPlace conftest.py \
|
||||||
|
--replace "sys.exit(1)" ""
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
ansible-base
|
ansible-compat
|
||||||
|
ansible-core
|
||||||
enrich
|
enrich
|
||||||
flaky
|
|
||||||
pyyaml
|
pyyaml
|
||||||
rich
|
rich
|
||||||
ruamel-yaml
|
ruamel-yaml
|
||||||
tenacity
|
|
||||||
wcmatch
|
wcmatch
|
||||||
yamllint
|
yamllint
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# tests can't be easily run without installing things from ansible-galaxy
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
|
flaky
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
@ -55,7 +64,7 @@ buildPythonPackage rec {
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
# ansible wants to write to $HOME and crashes if it can't
|
# ansible wants to write to $HOME and crashes if it can't
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
export PATH=$PATH:${lib.makeBinPath [ ansible-base ]}
|
export PATH=$PATH:${lib.makeBinPath [ ansible-core ]}
|
||||||
|
|
||||||
# create a working ansible-lint executable
|
# create a working ansible-lint executable
|
||||||
export PATH=$PATH:$PWD/src/ansiblelint
|
export PATH=$PATH:$PWD/src/ansiblelint
|
||||||
|
@ -82,7 +91,7 @@ buildPythonPackage rec {
|
||||||
"test_discover_lintables_umlaut"
|
"test_discover_lintables_umlaut"
|
||||||
];
|
];
|
||||||
|
|
||||||
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible-base ]}" ];
|
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible-core ]}" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/ansible-community/ansible-lint";
|
homepage = "https://github.com/ansible-community/ansible-lint";
|
||||||
|
|
Loading…
Reference in a new issue