about summary refs log tree commit diff
path: root/pkgs/development/python-modules/portion/default.nix
blob: 5cba2a57929454d61e5a24d5b1e40ea71023bb7a (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
47
48
49
{ 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 ];
  };
}