Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 platformdirs,
5 bokeh,
6 buildPythonPackage,
7 dask,
8 entrypoints,
9 fetchFromGitHub,
10 fsspec,
11 hvplot,
12 intake-parquet,
13 jinja2,
14 msgpack,
15 msgpack-numpy,
16 pandas,
17 panel,
18 pyarrow,
19 pytestCheckHook,
20 python-snappy,
21 pythonAtLeast,
22 pyyaml,
23 networkx,
24 requests,
25 setuptools,
26 setuptools-scm,
27 tornado,
28}:
29
30buildPythonPackage rec {
31 pname = "intake";
32 version = "2.0.8";
33 pyproject = true;
34
35 src = fetchFromGitHub {
36 owner = "intake";
37 repo = "intake";
38 tag = version;
39 hash = "sha256-Mjf4CKLFrIti9pFP6HTt1D/iYw0WMowLIfMdfM7Db+E=";
40 };
41
42 nativeBuildInputs = [
43 setuptools
44 setuptools-scm
45 ];
46
47 propagatedBuildInputs = [
48 platformdirs
49 dask
50 entrypoints
51 fsspec
52 msgpack
53 jinja2
54 pandas
55 pyyaml
56 networkx
57 ];
58
59 nativeCheckInputs = [
60 intake-parquet
61 pytestCheckHook
62 ]
63 ++ lib.concatAttrValues optional-dependencies;
64
65 optional-dependencies = {
66 server = [
67 msgpack
68 python-snappy
69 tornado
70 ];
71 dataframe = [
72 msgpack-numpy
73 pyarrow
74 ];
75 plot = [
76 hvplot
77 bokeh
78 panel
79 ];
80 remote = [ requests ];
81 };
82
83 __darwinAllowLocalNetworking = true;
84
85 preCheck = ''
86 export HOME=$(mktemp -d);
87 export PATH="$PATH:$out/bin";
88 '';
89
90 disabledTestPaths = [
91 # Missing plusins
92 "intake/catalog/tests/test_alias.py"
93 "intake/catalog/tests/test_gui.py"
94 "intake/catalog/tests/test_local.py"
95 "intake/catalog/tests/test_reload_integration.py"
96 "intake/source/tests/test_csv.py"
97 "intake/source/tests/test_derived.py"
98 "intake/source/tests/test_npy.py"
99 "intake/source/tests/test_text.py"
100 "intake/tests/test_config.py"
101 "intake/tests/test_top_level.py"
102 ];
103
104 disabledTests = [
105 # Disable tests which touch network
106 "http"
107 "test_address_flag"
108 "test_dir"
109 "test_discover"
110 "test_filtered_compressed_cache"
111 "test_flatten_flag"
112 "test_get_dir"
113 "test_pagination"
114 "test_port_flag"
115 "test_read_part_compressed"
116 "test_read_partition"
117 "test_read_pattern"
118 "test_remote_arr"
119 "test_remote_cat"
120 "test_remote_env"
121 # ValueError
122 "test_datasource_python_to_dask"
123 "test_catalog_passthrough"
124 # Timing-based, flaky on darwin and possibly others
125 "test_idle_timer"
126 ]
127 ++ lib.optionals (pythonAtLeast "3.12") [
128 # Require deprecated distutils
129 "test_which"
130 "test_load"
131 ];
132
133 pythonImportsCheck = [ "intake" ];
134
135 meta = {
136 description = "Data load and catalog system";
137 homepage = "https://github.com/ContinuumIO/intake";
138 changelog = "https://github.com/intake/intake/blob/${version}/docs/source/changelog.rst";
139 license = lib.licenses.bsd2;
140 maintainers = [ ];
141 };
142}