about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/backports-cached-property/default.nix
blob: 27ad57237063aaabd80c2b7adf8074d46b52f44d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
, setuptools-scm, wheel
, pytestCheckHook, pytest-mock, pytest-sugar
}:

buildPythonPackage rec {
  pname = "backports-cached-property";
  version = "1.0.2";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "penguinolog";
    repo = "backports.cached_property";
    rev = version;
    hash = "sha256-rdgKbVQaELilPrN4ve8RbbaLiT14Xex0esy5vUX2ZBc=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    wheel
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mock
    pytest-sugar
  ];

  pythonImportsCheck = [
    "backports.cached_property"
  ];

  meta = with lib; {
    description = "Python 3.8 functools.cached_property backport to python 3.6";
    homepage = "https://github.com/penguinolog/backports.cached_property";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ izorkin ];
  };
}