1{
2 lib,
3 buildPythonPackage,
4 etcd,
5 fetchFromGitHub,
6 grpcio,
7 hypothesis,
8 mock,
9 pifpaf,
10 protobuf,
11 pytestCheckHook,
12 six,
13 tenacity,
14}:
15
16buildPythonPackage rec {
17 pname = "etcd3";
18 version = "0.12.0";
19 format = "setuptools";
20
21 src = fetchFromGitHub {
22 owner = "kragniz";
23 repo = "python-etcd3";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-YM72+fkCDYXl6DORJa/O0sqXqHDWQcFLv2ifQ9kEHBo=";
26 };
27
28 propagatedBuildInputs = [
29 grpcio
30 protobuf
31 six
32 tenacity
33 ];
34
35 # various failures and incompatible with newer hypothesis versions
36 doCheck = false;
37
38 nativeCheckInputs = [
39 etcd
40 hypothesis
41 mock
42 pifpaf
43 pytestCheckHook
44 ];
45
46 preCheck = ''
47 pifpaf -e PYTHON run etcd --cluster
48 '';
49
50 pythonImportsCheck = [ "etcd3" ];
51
52 meta = with lib; {
53 description = "Python client for the etcd API v3";
54 homepage = "https://github.com/kragniz/python-etcd3";
55 license = licenses.asl20;
56 maintainers = [ ];
57 };
58}