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.3 KiB
Nix
59 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonAtLeast,
|
|
toolz,
|
|
multipledispatch,
|
|
py,
|
|
pytestCheckHook,
|
|
pytest-html,
|
|
pytest-benchmark,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "logical-unification";
|
|
version = "0.4.6";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pythological";
|
|
repo = "unification";
|
|
tag = "v${version}";
|
|
hash = "sha256-uznmlkREFONU1YoI/+mcfb+Yg30NinWvsMxTfHCXzOU=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
toolz
|
|
multipledispatch
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
py
|
|
pytestCheckHook
|
|
pytest-html
|
|
pytest-benchmark # Needed for the `--benchmark-skip` flag
|
|
];
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.12") [
|
|
# Failed: DID NOT RAISE <class 'RecursionError'>
|
|
"test_reify_recursion_limit"
|
|
];
|
|
|
|
pytestFlags = [
|
|
"--benchmark-skip"
|
|
"--html=testing-report.html"
|
|
"--self-contained-html"
|
|
];
|
|
|
|
pythonImportsCheck = [ "unification" ];
|
|
|
|
meta = with lib; {
|
|
description = "Straightforward unification in Python that's extensible via generic functions";
|
|
homepage = "https://github.com/pythological/unification";
|
|
changelog = "https://github.com/pythological/unification/releases";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ Etjean ];
|
|
};
|
|
}
|