depot/third_party/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

59 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
distro,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "ruyaml";
version = "0.91.0";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "pycontribs";
repo = "ruyaml";
rev = "refs/tags/v${version}";
hash = "sha256-A37L/voBrn2aZ7xT8+bWdZJxbWRjnxbstQtSyUeN1sA=";
};
postPatch = ''
# https://github.com/pycontribs/ruyaml/pull/107
substituteInPlace pyproject.toml \
--replace '"pip >= 19.3.1",' "" \
--replace '"setuptools_scm_git_archive >= 1.1",' ""
'';
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ distro ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
pythonImportsCheck = [ "ruyaml" ];
disabledTests = [
# Assertion error
"test_issue_60"
"test_issue_60_1"
"test_issue_61"
];
meta = with lib; {
description = "YAML 1.2 loader/dumper package for Python";
homepage = "https://ruyaml.readthedocs.io/";
changelog = "https://github.com/pycontribs/ruyaml/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}