2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
grpcio,
|
|
|
|
protobuf,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aetcd";
|
|
|
|
version = "1.0.0a4";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "martyanov";
|
|
|
|
repo = "aetcd";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-g49ppfh8dyGpZeu/HdTDX8RAk5VTcZmqENRpNY12qkg=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "setuptools_scm==6.3.2" "setuptools_scm"
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace-fail "--cov=aetcd" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
grpcio
|
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aetcd" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require a running ectd instance
|
|
|
|
"tests/integration/"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python asyncio-based client for etcd";
|
|
|
|
homepage = "https://github.com/martyanov/aetcd";
|
|
|
|
changelog = "https://github.com/martyanov/aetcd/blob/v${version}/docs/changelog.rst";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|