python3Packages.{kazoo,pure-sasl}: add optional dependencies
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
|
||||
# optional dependencies
|
||||
eventlet,
|
||||
gevent,
|
||||
pure-sasl,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -14,6 +19,17 @@ buildPythonPackage rec {
|
||||
hash = "sha256-kFeWrk9MEr1OSukubl0BhDnmtWyM+7JIJTYuebIw2rE=";
|
||||
};
|
||||
|
||||
optional-dependencies = {
|
||||
eventlet = [ eventlet ];
|
||||
gevent = [ gevent ];
|
||||
sasl = [ pure-sasl ];
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
"kazoo"
|
||||
"kazoo.client"
|
||||
];
|
||||
|
||||
# tests take a long time to run and leave threads hanging
|
||||
doCheck = false;
|
||||
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build system
|
||||
setuptools,
|
||||
|
||||
# optional dependencies
|
||||
pykerberos,
|
||||
|
||||
# test dependencies
|
||||
mock,
|
||||
pytestCheckHook,
|
||||
six,
|
||||
}:
|
||||
@@ -10,7 +18,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "pure-sasl";
|
||||
version = "0.6.2";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thobbs";
|
||||
@@ -19,23 +27,29 @@ buildPythonPackage rec {
|
||||
hash = "sha256-AHoZ3QZLr0JLE8+a2zkB06v2wRknxhgm/tcEPXaJX/U=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tests/unit/test_mechanism.py \
|
||||
--replace 'from mock import patch' 'from unittest.mock import patch'
|
||||
'';
|
||||
build-system = [ setuptools ];
|
||||
|
||||
pythonImportsCheck = [ "puresasl" ];
|
||||
optional-dependencies = {
|
||||
gssapi = [ pykerberos ];
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
"puresasl"
|
||||
"puresasl.client"
|
||||
"puresasl.mechanisms"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pykerberos
|
||||
mock
|
||||
pytestCheckHook
|
||||
six
|
||||
];
|
||||
]
|
||||
++ lib.concatAttrValues optional-dependencies;
|
||||
|
||||
meta = {
|
||||
description = "Reasonably high-level SASL client written in pure Python";
|
||||
homepage = "http://github.com/thobbs/pure-sasl";
|
||||
changelog = "https://github.com/thobbs/pure-sasl/blob/0.6.2/CHANGES.rst";
|
||||
changelog = "https://github.com/thobbs/pure-sasl/blob/${src.tag}/CHANGES.rst";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ jherland ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user