2021-07-21 07:28:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2021-07-21 07:28:18 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cython
|
|
|
|
, libyaml
|
|
|
|
, python
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyYAML";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "6.0";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yaml";
|
|
|
|
repo = "pyyaml";
|
|
|
|
rev = version;
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-wcII32mRgRRmAgojntyxBMQkjvxU2jylCgVzlHAj2Xc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ libyaml ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
checkPhase = ''
|
2021-07-21 07:28:18 +00:00
|
|
|
runHook preCheck
|
2022-01-13 20:06:32 +00:00
|
|
|
PYTHONPATH="tests/lib:$PYTHONPATH" ${python.interpreter} -m test_all
|
2021-07-21 07:28:18 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yaml" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The next generation YAML parser and emitter for Python";
|
|
|
|
homepage = "https://github.com/yaml/pyyaml";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|