about summary refs log tree commit diff
path: root/pkgs/development/python-modules/portion/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/portion/default.nix')
-rw-r--r--pkgs/development/python-modules/portion/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/portion/default.nix b/pkgs/development/python-modules/portion/default.nix
new file mode 100644
index 0000000000000..51ca2c1190264
--- /dev/null
+++ b/pkgs/development/python-modules/portion/default.nix
@@ -0,0 +1,44 @@
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+  setuptools,
+  wheel,
+  sortedcontainers,
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "portion";
+  version = "2.4.2";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "AlexandreDecan";
+    repo = "portion";
+    rev = "refs/tags/${version}";
+    hash = "sha256-URoyuE0yivUqPjJZbvATkAnTxicY4F2eiJ16rIUdY3Y=";
+  };
+
+  build-system = [
+    setuptools
+    wheel
+  ];
+
+  dependencies = [ sortedcontainers ];
+
+  pythonImportsCheck = [ "portion" ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  meta = with lib; {
+    description = "Portion, a Python library providing data structure and operations for intervals";
+    homepage = "https://github.com/AlexandreDecan/portion";
+    changelog = "https://github.com/AlexandreDecan/portion/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ GaetanLepage ];
+  };
+}