2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, ruamel-base
|
|
|
|
, ruamel-ordereddict
|
|
|
|
, ruamel-yaml-clib ? null
|
|
|
|
, isPy27
|
2021-06-28 23:13:55 +00:00
|
|
|
, isPyPy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "ruamel-yaml";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.16.13";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "ruamel.yaml";
|
|
|
|
inherit version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0hm9yg785f46bkrgqknd6fdvmkby9dpzjnm0b63qf0i748acaj5v";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Tests use relative paths
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ ruamel-base ]
|
|
|
|
++ lib.optional isPy27 ruamel-ordereddict
|
|
|
|
++ lib.optional (!isPyPy) ruamel-yaml-clib;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# causes namespace clash on py27
|
2021-12-06 16:07:01 +00:00
|
|
|
dontUsePythonImportsCheck = isPy27;
|
|
|
|
pythonImportsCheck = [ "ruamel.yaml" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order";
|
|
|
|
homepage = "https://sourceforge.net/projects/ruamel-yaml/";
|
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|