2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2021-04-05 15:23:46 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, dill
|
|
|
|
, coverage
|
|
|
|
, coveralls
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2021-04-05 15:23:46 +00:00
|
|
|
pname = "expiringdict";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "1.2.2";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
# use fetchFromGitHub instead of fetchPypi because the test suite of
|
|
|
|
# the package is not included into the PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mailgun";
|
|
|
|
repo = pname;
|
2022-10-30 15:09:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
dill
|
|
|
|
coverage
|
|
|
|
coveralls
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2022-10-30 15:09:59 +00:00
|
|
|
runHook preCheck
|
2021-04-05 15:23:46 +00:00
|
|
|
nosetests -v --with-coverage --cover-package=expiringdict
|
2022-10-30 15:09:59 +00:00
|
|
|
runHook postCheck
|
2021-04-05 15:23:46 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"expiringdict"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Dictionary with auto-expiring values for caching purposes";
|
2022-10-30 15:09:59 +00:00
|
|
|
homepage = "https://github.com/mailgun/expiringdict";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ gravndal ];
|
|
|
|
};
|
|
|
|
}
|