1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 urllib3,
7 dnspython,
8 pytestCheckHook,
9 etcd_3_4,
10 mock,
11 pyopenssl,
12}:
13
14buildPythonPackage {
15 pname = "python-etcd";
16 version = "0.5.0-unstable-2023-10-31";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "jplana";
21 repo = "python-etcd";
22 rev = "5aea0fd4461bd05dd96e4ad637f6be7bceb1cee5";
23 hash = "sha256-eVirStLOPTbf860jfkNMWtGf+r0VygLZRjRDjBMCVKg=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 urllib3
30 dnspython
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 etcd_3_4
36 mock
37 pyopenssl
38 ];
39
40 preCheck = ''
41 for file in "test_auth" "integration/test_simple"; do
42 substituteInPlace src/etcd/tests/$file.py \
43 --replace-fail "assertEquals" "assertEqual"
44 done
45 '';
46
47 meta = with lib; {
48 description = "Python client for Etcd";
49 homepage = "https://github.com/jplana/python-etcd";
50 license = licenses.mit;
51 };
52}