2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-07-31 10:19:44 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
urllib3,
|
|
|
|
dnspython,
|
2024-07-31 10:19:44 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
etcd_3_4,
|
|
|
|
mock,
|
|
|
|
pyopenssl,
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
buildPythonPackage {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python-etcd";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "0.5.0-unstable-2023-10-31";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jplana";
|
|
|
|
repo = "python-etcd";
|
|
|
|
rev = "5aea0fd4461bd05dd96e4ad637f6be7bceb1cee5";
|
|
|
|
hash = "sha256-eVirStLOPTbf860jfkNMWtGf+r0VygLZRjRDjBMCVKg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
dependencies = [
|
2024-06-05 15:53:02 +00:00
|
|
|
urllib3
|
|
|
|
dnspython
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
etcd_3_4
|
|
|
|
mock
|
|
|
|
pyopenssl
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# arm64 is an unsupported platform on etcd 3.4. should be able to be removed on >= etcd 3.5
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
preCheck = ''
|
|
|
|
for file in "test_auth" "integration/test_simple"; do
|
|
|
|
substituteInPlace src/etcd/tests/$file.py \
|
|
|
|
--replace-fail "assertEquals" "assertEqual"
|
|
|
|
done
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python client for Etcd";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jplana/python-etcd";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|