1{
2 lib,
3 stdenv,
4 beautifulsoup4,
5 buildPythonPackage,
6 fetchFromGitHub,
7 html5lib,
8 jinja2,
9 lxml,
10 matplotlib,
11 odfpy,
12 openpyxl,
13 pandas,
14 poetry-core,
15 pyarrow,
16 pyreadstat,
17 pytestCheckHook,
18 pythonOlder,
19 scipy,
20 sqlalchemy,
21 tables,
22 tabulate,
23 types-pytz,
24 typing-extensions,
25 xarray,
26 xlsxwriter,
27}:
28
29buildPythonPackage rec {
30 pname = "pandas-stubs";
31 version = "2.2.0.240218";
32 pyproject = true;
33
34 disabled = pythonOlder "3.9";
35
36 src = fetchFromGitHub {
37 owner = "pandas-dev";
38 repo = "pandas-stubs";
39 rev = "refs/tags/v${version}";
40 hash = "sha256-416vyaHcSfTfkSNKZ05edozfsMmNKcpOZAoPenCLFzQ=";
41 };
42
43 nativeBuildInputs = [ poetry-core ];
44
45 propagatedBuildInputs = [
46 pandas
47 types-pytz
48 ];
49
50 nativeCheckInputs = [
51 beautifulsoup4
52 html5lib
53 jinja2
54 lxml
55 matplotlib
56 odfpy
57 openpyxl
58 pyarrow
59 pyreadstat
60 pytestCheckHook
61 scipy
62 sqlalchemy
63 tables
64 tabulate
65 typing-extensions
66 xarray
67 xlsxwriter
68 ];
69
70 disabledTests =
71 [
72 # AttributeErrors, missing dependencies, error and warning checks
73 "test_types_groupby"
74 "test_frame_groupby_resample"
75 "test_orc"
76 "test_all_read_without_lxml_dtype_backend"
77 "test_show_version"
78 ]
79 ++ lib.optionals stdenv.isDarwin [
80 "test_plotting" # Fatal Python error: Illegal instruction
81 ];
82
83 pythonImportsCheck = [ "pandas" ];
84
85 meta = with lib; {
86 description = "Type annotations for Pandas";
87 homepage = "https://github.com/pandas-dev/pandas-stubs";
88 license = licenses.mit;
89 maintainers = with maintainers; [ malo ];
90 };
91}