about summary refs log tree commit diff
path: root/pkgs/development/python-modules/backports-cached-property/default.nix
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2022-08-15 14:14:18 +0300
committerIzorkin <izorkin@elven.pw>2022-08-16 15:12:07 +0300
commit73ee1a3b1cfe7b3cf7bc410c77f767191ed20aa8 (patch)
treee9d6ab5a4dbb12d9c95430d32cdf005693e43e9b /pkgs/development/python-modules/backports-cached-property/default.nix
parent1767504eec23e61e53f3d96e2d1dec56eb0a857c (diff)
python3Packages.backports-cached-property: init at 1.0.2
Diffstat (limited to 'pkgs/development/python-modules/backports-cached-property/default.nix')
-rw-r--r--pkgs/development/python-modules/backports-cached-property/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/backports-cached-property/default.nix b/pkgs/development/python-modules/backports-cached-property/default.nix
new file mode 100644
index 0000000000000..7bb8c4e812258
--- /dev/null
+++ b/pkgs/development/python-modules/backports-cached-property/default.nix
@@ -0,0 +1,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;
+    sha256 = "sha256-rdgKbVQaELilPrN4ve8RbbaLiT14Xex0esy5vUX2ZBc=";
+  };
+
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    wheel
+  ];
+
+  checkInputs = [
+    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 ];
+  };
+}