Merge pull request #98282 from mweinelt/python/yq
pythonPackages.yq: update, repackage as library, fix tests
This commit is contained in:
commit
4eb55225a1
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, buildPythonApplication
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pkgs
|
||||
, argcomplete
|
||||
, pyyaml
|
||||
, xmltodict
|
||||
@ -9,31 +10,40 @@
|
||||
, flake8
|
||||
, jq
|
||||
, pytest
|
||||
, unixtools
|
||||
, toml
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
buildPythonPackage rec {
|
||||
pname = "yq";
|
||||
version = "2.10.1";
|
||||
version = "2.11.0";
|
||||
|
||||
propagatedBuildInputs = [ pyyaml xmltodict jq argcomplete ];
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1gp9q5w1bjbw7wmba5hm8ippwvkind0p02n07fqa9jlqglhxhm46";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyyaml
|
||||
xmltodict
|
||||
argcomplete
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkInputs = [
|
||||
unixtools.script
|
||||
pytest
|
||||
coverage
|
||||
flake8
|
||||
jq
|
||||
pkgs.jq
|
||||
toml
|
||||
];
|
||||
|
||||
checkPhase = "pytest ./test/test.py";
|
||||
# tests fails if stdin is not a tty
|
||||
checkPhase = "echo | script -c 'pytest ./test/test.py'";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1h6nnkp53mm4spwy8nyxwvh9j6p4lxvf20j4bgjskhnhaw3jl9gn";
|
||||
};
|
||||
pythonImportsCheck = [ "yq" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line YAML processor - jq wrapper for YAML documents.";
|
@ -11801,10 +11801,7 @@ in
|
||||
|
||||
yodl = callPackage ../development/tools/misc/yodl { };
|
||||
|
||||
yq = callPackage ../development/tools/yq {
|
||||
inherit (python3Packages)
|
||||
buildPythonApplication fetchPypi argcomplete pyyaml xmltodict pytest coverage flake8 toml;
|
||||
};
|
||||
yq = python3.pkgs.toPythonApplication python3.pkgs.yq;
|
||||
|
||||
yq-go = callPackage ../development/tools/yq-go { };
|
||||
|
||||
|
@ -7622,6 +7622,8 @@ in {
|
||||
|
||||
yowsup = callPackage ../development/python-modules/yowsup { };
|
||||
|
||||
yq = callPackage ../development/python-modules/yq { };
|
||||
|
||||
yt = callPackage ../development/python-modules/yt { };
|
||||
|
||||
yubico-client = callPackage ../development/python-modules/yubico-client { };
|
||||
|
Loading…
Reference in New Issue
Block a user