2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
distro,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools-scm,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ruyaml";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.91.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pycontribs";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "ruyaml";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-A37L/voBrn2aZ7xT8+bWdZJxbWRjnxbstQtSyUeN1sA=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
postPatch = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
# https://github.com/pycontribs/ruyaml/pull/107
|
2024-01-25 14:12:00 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"pip >= 19.3.1",' "" \
|
|
|
|
--replace '"setuptools_scm_git_archive >= 1.1",' ""
|
|
|
|
'';
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ distro ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pytestFlagsArray = [
|
2024-06-05 15:53:02 +00:00
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "ruyaml" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Assertion error
|
|
|
|
"test_issue_60"
|
|
|
|
"test_issue_60_1"
|
|
|
|
"test_issue_61"
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "YAML 1.2 loader/dumper package for Python";
|
|
|
|
homepage = "https://ruyaml.readthedocs.io/";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/pycontribs/ruyaml/releases/tag/v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|