1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6}: 7 8let 9 sortedcontainers = buildPythonPackage rec { 10 pname = "sortedcontainers"; 11 version = "2.4.0"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "grantjenks"; 16 repo = "python-sortedcontainers"; 17 rev = "v${version}"; 18 hash = "sha256-YRbSM2isWi7AzfquFvuZBlpEMNUnBJTBLBn0/XYVHKQ="; 19 }; 20 21 doCheck = false; 22 23 nativeCheckInputs = [ pytestCheckHook ]; 24 25 pythonImportsCheck = [ "sortedcontainers" ]; 26 27 passthru.tests = { 28 pytest = sortedcontainers.overridePythonAttrs (_: { 29 doCheck = true; 30 }); 31 }; 32 33 meta = with lib; { 34 description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet"; 35 homepage = "https://grantjenks.com/docs/sortedcontainers/"; 36 license = licenses.asl20; 37 maintainers = [ ]; 38 }; 39 }; 40in 41sortedcontainers