1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 dask,
6 urllib3,
7 geojson,
8 verlib2,
9 pueblo,
10 pandas,
11 pythonOlder,
12 sqlalchemy,
13 pytestCheckHook,
14 pytz,
15 setuptools,
16 orjson,
17}:
18
19buildPythonPackage rec {
20 pname = "crate";
21 version = "2.0.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "crate";
28 repo = "crate-python";
29 tag = version;
30 hash = "sha256-K09jezBINTw4sUl1Xvm4lJa68ZpwMy9ju/pxdRwnaE4=";
31 };
32
33 build-system = [
34 setuptools
35 ];
36
37 dependencies = [
38 orjson
39 urllib3
40 sqlalchemy
41 geojson
42 verlib2
43 pueblo
44 ];
45
46 nativeCheckInputs = [
47 dask
48 pandas
49 pytestCheckHook
50 pytz
51 ];
52
53 disabledTests = [
54 # the following tests require network access
55 "test_layer_from_uri"
56 "test_additional_settings"
57 "test_basic"
58 "test_cluster"
59 "test_default_settings"
60 "test_dynamic_http_port"
61 "test_environment_variables"
62 "test_verbosity"
63 ];
64
65 disabledTestPaths = [
66 # imports setuptools.ssl_support, which doesn't exist anymore
67 "tests/client/test_http.py"
68 ];
69
70 meta = with lib; {
71 homepage = "https://github.com/crate/crate-python";
72 description = "Python client library for CrateDB";
73 changelog = "https://github.com/crate/crate-python/blob/${version}/CHANGES.txt";
74 license = licenses.asl20;
75 maintainers = with maintainers; [ doronbehar ];
76 };
77}