2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy27, six
|
2021-06-04 09:07:49 +00:00
|
|
|
, pytest, backports_unittest-mock, keyring, setuptools-scm, toml
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "keyrings.alt";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "4.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "cc475635099d6edd7e475c5a479e5b4da5e811a3af04495a1e9ada488d16fe25";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--flake8" ""
|
|
|
|
'';
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm toml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
checkInputs = [ pytest keyring ] ++ lib.optional (pythonOlder "3.3") backports_unittest-mock;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# heavily relies on importing tests from keyring package
|
|
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"keyrings.alt"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "Alternate keyring implementations";
|
|
|
|
homepage = "https://github.com/jaraco/keyrings.alt";
|
|
|
|
maintainers = with maintainers; [ nyarly ];
|
|
|
|
};
|
|
|
|
}
|