2017-12-31 11:17:36 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2018-02-26 22:42:14 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest
|
2017-12-31 11:17:36 +00:00
|
|
|
, freezegun
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cached-property";
|
2018-11-05 12:40:23 +00:00
|
|
|
version = "1.5.1";
|
2017-12-31 11:17:36 +00:00
|
|
|
|
2018-02-26 22:42:14 +00:00
|
|
|
# conftest.py is missing in PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pydanny";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2018-11-05 12:40:23 +00:00
|
|
|
sha256 = "0xh0pwmiikx0il9nnfyf034ydmlw6992s0d209agd9j5d3s2k5q6";
|
2017-12-31 11:17:36 +00:00
|
|
|
};
|
|
|
|
|
2018-02-26 22:42:14 +00:00
|
|
|
checkInputs = [ pytest freezegun ];
|
|
|
|
|
2018-11-05 12:40:23 +00:00
|
|
|
# https://github.com/pydanny/cached-property/issues/131
|
2018-02-26 22:42:14 +00:00
|
|
|
checkPhase = ''
|
2018-11-05 12:40:23 +00:00
|
|
|
py.test -k "not test_threads_ttl_expiry"
|
2018-02-26 22:42:14 +00:00
|
|
|
'';
|
2017-12-31 11:17:36 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A decorator for caching properties in classes";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/pydanny/cached-property";
|
2017-12-31 11:17:36 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ ericsagnes ];
|
|
|
|
};
|
2018-02-26 22:42:14 +00:00
|
|
|
}
|