1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 grpcio,
6 protobuf,
7 pytest-asyncio,
8 pytest-cov-stub,
9 pytest-mock,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13 setuptools-scm,
14}:
15
16buildPythonPackage rec {
17 pname = "aetcd";
18 version = "1.0.0a4";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "martyanov";
25 repo = "aetcd";
26 tag = "v${version}";
27 hash = "sha256-g49ppfh8dyGpZeu/HdTDX8RAk5VTcZmqENRpNY12qkg=";
28 };
29
30 postPatch = ''
31 substituteInPlace setup.py \
32 --replace-fail "setuptools_scm==6.3.2" "setuptools_scm"
33 '';
34
35 pythonRelaxDeps = [ "protobuf" ];
36
37 build-system = [
38 setuptools
39 setuptools-scm
40 ];
41
42 dependencies = [
43 grpcio
44 protobuf
45 ];
46
47 nativeCheckInputs = [
48 pytest-asyncio
49 pytest-cov-stub
50 pytest-mock
51 pytestCheckHook
52 ];
53
54 pythonImportsCheck = [ "aetcd" ];
55
56 disabledTestPaths = [
57 # Tests require a running ectd instance
58 "tests/integration/"
59 ];
60
61 meta = with lib; {
62 description = "Python asyncio-based client for etcd";
63 homepage = "https://github.com/martyanov/aetcd";
64 changelog = "https://github.com/martyanov/aetcd/blob/v${version}/docs/changelog.rst";
65 license = licenses.asl20;
66 maintainers = with maintainers; [ fab ];
67 };
68}