depot/third_party/nixpkgs/pkgs/development/python-modules/pyyaml/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

47 lines
882 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, cython
, setuptools
, libyaml
, python
}:
buildPythonPackage rec {
pname = "pyyaml";
version = "6.0.1";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchFromGitHub {
owner = "yaml";
repo = "pyyaml";
rev = version;
hash = "sha256-YjWMyMVDByLsN5vEecaYjHpR1sbBey1L/khn4oH9SPA=";
};
nativeBuildInputs = [
cython
setuptools
];
buildInputs = [ libyaml ];
checkPhase = ''
runHook preCheck
PYTHONPATH="tests/lib:$PYTHONPATH" ${python.interpreter} -m test_all
runHook postCheck
'';
pythonImportsCheck = [ "yaml" ];
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 ];
};
}