forked from mirrors/nixpkgs
41 lines
903 B
Nix
41 lines
903 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, ruamel_base
|
|
, ruamel_ordereddict
|
|
, ruamel_yaml_clib
|
|
, isPy3k
|
|
, isPyPy
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ruamel.yaml";
|
|
version = "0.16.10";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954";
|
|
};
|
|
|
|
# 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;
|
|
};
|
|
|
|
}
|