summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/sortedcontainers/default.nix
blob: 985644224307ceac8a17f91aec7ad56518ad0136 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
}:

let
  sortedcontainers = buildPythonPackage rec {
    pname = "sortedcontainers";
    version = "2.4.0";
    format = "setuptools";

    src = fetchFromGitHub {
      owner = "grantjenks";
      repo = "python-sortedcontainers";
      rev = "v${version}";
      hash = "sha256-YRbSM2isWi7AzfquFvuZBlpEMNUnBJTBLBn0/XYVHKQ=";
    };

    doCheck = false;

    nativeCheckInputs = [ pytestCheckHook ];

    pythonImportsCheck = [ "sortedcontainers" ];

    passthru.tests = {
      pytest = sortedcontainers.overridePythonAttrs (_: {
        doCheck = true;
      });
    };

    meta = {
      description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet";
      homepage = "https://grantjenks.com/docs/sortedcontainers/";
      license = lib.licenses.asl20;
      maintainers = [ ];
    };
  };
in
sortedcontainers