
This treewide change targets Python packages that specifies pytest flags with pytestFlagsArray, and whose flags cannot be consructed by other pytestCheckHook-honoured arguments. Use the __structuredAttrs-agnostic argument pytestFlags instead of the deprecated pytestFlagsArray. For flags with option arguments, join each flag and their option argument into a single command-line argument following POSIX Utility Argument Syntax[1] for easier overriding (remove/replace). Examples: * [ "-W" "ignore:message:WarningClass" ] -> [ "-Wignore:message:WarningClass" ] * [ "--reruns" "3" ] -> [ "--reruns=3" ] [1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
59 lines
1.2 KiB
Nix
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";
|
|
tag = "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 ];
|
|
|
|
pytestFlags = [
|
|
"-Wignore::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 ];
|
|
};
|
|
}
|