1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 beartype,
8 invoke,
9 numpy,
10 pandas,
11 feedparser,
12}:
13
14buildPythonPackage rec {
15 pname = "nptyping";
16 version = "2.5.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "ramonhagenaars";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-hz4YrcvARCAA7TXapmneIwle/F4pzcIYLPSmiFHC0VQ=";
26 };
27
28 propagatedBuildInputs = [ numpy ];
29
30 nativeCheckInputs = [
31 beartype
32 feedparser
33 invoke
34 pandas
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # tries to download data
40 "test_pandas_stubs_fork_is_synchronized"
41 ];
42
43 disabledTestPaths = [
44 # missing pyright import:
45 "tests/test_pyright.py"
46 # can't find mypy stubs for pandas:
47 "tests/test_mypy.py"
48 "tests/pandas_/test_mypy_dataframe.py"
49 # typeguard release broke nptyping compatibility:
50 "tests/test_typeguard.py"
51 # tries to build wheel of package, broken/unnecessary under Nix:
52 "tests/test_wheel.py"
53 # beartype fails a type check
54 "tests/test_beartype.py"
55 ];
56
57 pythonImportsCheck = [ "nptyping" ];
58
59 meta = with lib; {
60 description = "Type hints for numpy";
61 homepage = "https://github.com/ramonhagenaars/nptyping";
62 changelog = "https://github.com/ramonhagenaars/nptyping/blob/v${version}/HISTORY.md";
63 license = licenses.mit;
64 maintainers = with maintainers; [ bcdarwin ];
65 };
66}