depot/third_party/nixpkgs/pkgs/development/python-modules/cached-property/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
788 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
, freezegun
}:
buildPythonPackage rec {
pname = "cached-property";
version = "1.5.1";
# conftest.py is missing in PyPI tarball
src = fetchFromGitHub {
owner = "pydanny";
repo = pname;
rev = version;
sha256 = "0xh0pwmiikx0il9nnfyf034ydmlw6992s0d209agd9j5d3s2k5q6";
};
checkInputs = [ pytest freezegun ];
# https://github.com/pydanny/cached-property/issues/131
checkPhase = ''
py.test -k "not test_threads_ttl_expiry"
'';
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 ];
};
}