push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
{
lib,
astor,
asttokens,
asyncstdlib,
buildPythonPackage,
deal,
dpcontracts,
fetchFromGitHub,
numpy,
pytestCheckHook,
pythonOlder,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "icontract";
version = "2.7.1";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Parquery";
repo = "icontract";
tag = "v${version}";
hash = "sha256-7mRQ1g2mllHIaZh0jEd/iCgaDja1KJXuRnamhDo/Pbo=";
};
preCheck = ''
# we don't want to use the precommit.py script to build the package.
# For the tests to succeed, "ICONTRACT_SLOW" needs to be set.
# see https://github.com/Parquery/icontract/blob/aaeb1b06780a34b05743377e4cb2458780e808d3/precommit.py#L57
export ICONTRACT_SLOW=1
'';
build-system = [ setuptools ];
dependencies = [
asttokens
typing-extensions
];
pythonRelaxDeps = [
"asttokens"
];
nativeCheckInputs = [
astor
asyncstdlib
deal
dpcontracts
numpy
pytestCheckHook
];
disabledTests = [
# AssertionError
"test_abstract_method_not_implemented"
];
disabledTestPaths = [
# mypy decorator checks don't pass. For some reason mypy
# doesn't check the python file provided in the test.
"tests/test_mypy_decorators.py"
# Those tests seems to simply re-run some typeguard tests
"tests/test_typeguard.py"
];
pytestFlags = [
# RuntimeWarning: coroutine '*' was never awaited
"-Wignore::RuntimeWarning"
];
pythonImportsCheck = [ "icontract" ];
meta = with lib; {
description = "Provide design-by-contract with informative violation messages";
homepage = "https://github.com/Parquery/icontract";
changelog = "https://github.com/Parquery/icontract/blob/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [
gador
thiagokokada
];
};
}