2017-12-31 12:17:36 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2018-02-26 23:42:14 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest
|
2017-12-31 12:17:36 +01:00
|
|
|
, freezegun
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cached-property";
|
2018-04-09 14:50:00 +02:00
|
|
|
version = "1.4.2";
|
2017-12-31 12:17:36 +01:00
|
|
|
|
2018-02-26 23:42:14 +01:00
|
|
|
# conftest.py is missing in PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pydanny";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2018-04-09 14:50:00 +02:00
|
|
|
sha256 = "0gjmgfilhljkx2b60cjikwh55jg2jwxhwi8hgkrzdnzk465ywhrw";
|
2017-12-31 12:17:36 +01:00
|
|
|
};
|
|
|
|
|
2018-02-26 23:42:14 +01:00
|
|
|
checkInputs = [ pytest freezegun ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
2017-12-31 12:17:36 +01: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 23:42:14 +01:00
|
|
|
}
|