2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cython_0,
|
|
|
|
setuptools,
|
|
|
|
libyaml,
|
|
|
|
python,
|
2021-07-21 07:28:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "pyyaml";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "6.0.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yaml";
|
|
|
|
repo = "pyyaml";
|
|
|
|
rev = version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-YjWMyMVDByLsN5vEecaYjHpR1sbBey1L/khn4oH9SPA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython_0
|
2023-08-10 07:59:29 +00:00
|
|
|
setuptools
|
|
|
|
];
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Next generation YAML parser and emitter for Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/yaml/pyyaml";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|