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