2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, ruamel_base
|
2021-04-26 19:14:03 +00:00
|
|
|
, ruamel_ordereddict ? null
|
|
|
|
, ruamel_yaml_clib ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
|
|
|
, isPyPy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ruamel.yaml";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.17.16";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "1a771fc92d3823682b7f0893ad56cb5a5c87c48e62b5399d6f42c8759a583b33";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Tests use relative paths
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ ruamel_base ]
|
|
|
|
++ lib.optional (!isPy3k) ruamel_ordereddict
|
|
|
|
++ lib.optional (!isPyPy) ruamel_yaml_clib;
|
|
|
|
|
|
|
|
# causes namespace clash on py27
|
|
|
|
dontUsePythonImportsCheck = !isPy3k;
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ruamel.yaml"
|
|
|
|
"ruamel.base"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|