anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / icontract / default.nix
blob090886d2ddda298a1b8a366c2aef143091841723
2   lib,
3   astor,
4   asttokens,
5   asyncstdlib,
6   buildPythonPackage,
7   deal,
8   dpcontracts,
9   fetchFromGitHub,
10   numpy,
11   pytestCheckHook,
12   pythonOlder,
13   setuptools,
14   typing-extensions,
17 buildPythonPackage rec {
18   pname = "icontract";
19   version = "2.7.1";
20   pyproject = true;
22   disabled = pythonOlder "3.6";
24   src = fetchFromGitHub {
25     owner = "Parquery";
26     repo = "icontract";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-7mRQ1g2mllHIaZh0jEd/iCgaDja1KJXuRnamhDo/Pbo=";
29   };
31   preCheck = ''
32     # we don't want to use the precommit.py script to build the package.
33     # For the tests to succeed, "ICONTRACT_SLOW" needs to be set.
34     # see https://github.com/Parquery/icontract/blob/aaeb1b06780a34b05743377e4cb2458780e808d3/precommit.py#L57
35     export ICONTRACT_SLOW=1
36   '';
38   build-system = [ setuptools ];
40   dependencies = [
41     asttokens
42     typing-extensions
43   ];
45   nativeCheckInputs = [
46     astor
47     asyncstdlib
48     deal
49     dpcontracts
50     numpy
51     pytestCheckHook
52   ];
54   disabledTests = [
55     # AssertionError
56     "test_abstract_method_not_implemented"
57   ];
59   disabledTestPaths = [
60     # mypy decorator checks don't pass. For some reason mypy
61     # doesn't check the python file provided in the test.
62     "tests/test_mypy_decorators.py"
63     # Those tests seems to simply re-run some typeguard tests
64     "tests/test_typeguard.py"
65   ];
67   pytestFlagsArray = [
68     # RuntimeWarning: coroutine '*' was never awaited
69     "-W"
70     "ignore::RuntimeWarning"
71   ];
73   pythonImportsCheck = [ "icontract" ];
75   meta = with lib; {
76     description = "Provide design-by-contract with informative violation messages";
77     homepage = "https://github.com/Parquery/icontract";
78     changelog = "https://github.com/Parquery/icontract/blob/v${version}/CHANGELOG.rst";
79     license = licenses.mit;
80     maintainers = with maintainers; [
81       gador
82       thiagokokada
83     ];
84   };