1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 sortedcontainers,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "portion";
12 version = "2.6.1";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "AlexandreDecan";
17 repo = "portion";
18 tag = version;
19 hash = "sha256-K4mZn8Fm96ZBBdLTMfM9f1GKDdIrRwDRzk6ObaXSFG4=";
20 };
21
22 build-system = [ hatchling ];
23
24 dependencies = [ sortedcontainers ];
25
26 pythonImportsCheck = [ "portion" ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 meta = {
31 description = "Portion, a Python library providing data structure and operations for intervals";
32 homepage = "https://github.com/AlexandreDecan/portion";
33 changelog = "https://github.com/AlexandreDecan/portion/blob/${src.rev}/CHANGELOG.md";
34 license = lib.licenses.lgpl3;
35 maintainers = with lib.maintainers; [ GaetanLepage ];
36 };
37}