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-02-26 17:44:37 +00:00
|
|
|
version = "1.4.0";
|
2017-12-31 11:17:36 +00:00
|
|
|
|
2018-02-26 22:42:14 +00:00
|
|
|
# conftest.py is missing in PyPI tarball
|
|
|
|
# https://github.com/pydanny/cached-property/pull/87
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pydanny";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0w7709grs4yqhfbnn7lva2fgyphvh43xcfqhi95lhh8sjad3xwkw";
|
2017-12-31 11:17:36 +00:00
|
|
|
};
|
|
|
|
|
2018-02-26 22:42:14 +00:00
|
|
|
checkInputs = [ pytest freezegun ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
2017-12-31 11:17:36 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A decorator for caching properties in classes";
|
|
|
|
homepage = https://github.com/pydanny/cached-property;
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ ericsagnes ];
|
|
|
|
};
|
2018-02-26 22:42:14 +00:00
|
|
|
}
|