2019-10-25 07:54:10 +01:00
|
|
|
{ lib
|
2018-10-26 17:59:52 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, ruamel_base
|
|
|
|
, ruamel_ordereddict
|
2019-10-25 07:54:10 +01:00
|
|
|
, ruamel_yaml_clib
|
2018-10-26 17:59:52 +01:00
|
|
|
, isPy3k
|
2019-10-25 07:54:10 +01:00
|
|
|
, isPyPy
|
2018-10-26 17:59:52 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ruamel.yaml";
|
2020-05-09 11:01:59 +01:00
|
|
|
version = "0.16.10";
|
2018-10-26 17:59:52 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 11:01:59 +01:00
|
|
|
sha256 = "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954";
|
2018-10-26 17:59:52 +01:00
|
|
|
};
|
|
|
|
|
2019-10-25 07:54:10 +01:00
|
|
|
# Tests use relative paths
|
2018-10-26 17:59:52 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2018-12-12 13:35:32 +00:00
|
|
|
propagatedBuildInputs = [ ruamel_base ]
|
2019-10-25 07:54:10 +01:00
|
|
|
++ lib.optional (!isPy3k) ruamel_ordereddict
|
|
|
|
++ lib.optional (!isPyPy) ruamel_yaml_clib;
|
2018-10-26 17:59:52 +01:00
|
|
|
|
2019-10-25 07:54:10 +01:00
|
|
|
# causes namespace clash on py27
|
|
|
|
dontUsePythonImportsCheck = !isPy3k;
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ruamel.yaml"
|
|
|
|
"ruamel.base"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-10-26 17:59:52 +01:00
|
|
|
description = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order";
|
2020-02-18 04:05:21 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/ruamel-yaml/";
|
2018-10-26 17:59:52 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|