1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 freezegun,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "cached-property";
13 version = "2.0.1";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "pydanny";
20 repo = "cached-property";
21 tag = version;
22 hash = "sha256-sOThFJs18DR9aBgIpqkORU4iRmhCVKehyM3DLYUt/Wc=";
23 };
24
25 build-system = [ setuptools ];
26
27 nativeCheckInputs = [
28 freezegun
29 pytestCheckHook
30 ];
31
32 disabledTests = [
33 # https://github.com/pydanny/cached-property/issues/131
34 "test_threads_ttl_expiry"
35 ];
36
37 pythonImportsCheck = [ "cached_property" ];
38
39 meta = with lib; {
40 description = "Decorator for caching properties in classes";
41 homepage = "https://github.com/pydanny/cached-property";
42 changelog = "https://github.com/pydanny/cached-property/releases/tag/${version}";
43 license = licenses.bsd3;
44 platforms = platforms.unix;
45 maintainers = with maintainers; [ ];
46 };
47}