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