evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / clickhouse-driver / default.nix
blob6eb3013063f52853cdb2f13ec1b61dd1348e688b
2   lib,
3   buildPythonPackage,
4   clickhouse-cityhash,
5   cython,
6   fetchFromGitHub,
7   freezegun,
8   lz4,
9   mock,
10   pytestCheckHook,
11   pytest-xdist,
12   pytz,
13   setuptools,
14   tzlocal,
15   zstd,
18 buildPythonPackage rec {
19   pname = "clickhouse-driver";
20   version = "0.2.7";
21   format = "setuptools";
23   # pypi source doesn't contain tests
24   src = fetchFromGitHub {
25     owner = "mymarilyn";
26     repo = "clickhouse-driver";
27     rev = version;
28     hash = "sha256-l0YHWY25PMHgZG/sAZjtGhwmcxWdA8k96zlm9hbKcek=";
29   };
31   nativeBuildInputs = [
32     cython
33     setuptools
34   ];
36   propagatedBuildInputs = [
37     clickhouse-cityhash
38     lz4
39     pytz
40     tzlocal
41     zstd
42   ];
44   nativeCheckInputs = [
45     freezegun
46     mock
47     pytest-xdist
48     pytestCheckHook
49   ];
51   postPatch = ''
52     substituteInPlace setup.py \
53       --replace "lz4<=3.0.1" "lz4<=4"
54   '';
56   # remove source to prevent pytest testing source instead of the build artifacts
57   # (the source doesn't contain the extension modules)
58   preCheck = ''
59     rm -rf clickhouse_driver
60   '';
62   # some test in test_buffered_reader.py doesn't seem to return
63   disabledTestPaths = [ "tests/test_buffered_reader.py" ];
65   # most tests require `clickhouse`
66   # TODO: enable tests after `clickhouse` unbroken
67   doCheck = false;
69   pythonImportsCheck = [ "clickhouse_driver" ];
71   meta = with lib; {
72     description = "Python driver with native interface for ClickHouse";
73     homepage = "https://github.com/mymarilyn/clickhouse-driver";
74     license = licenses.mit;
75     maintainers = with maintainers; [ breakds ];
76   };