nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python39Packages.sortedcontainers: enable tests, replace SuperSandro2000 as maintainer

+33 -18
+33 -18
pkgs/development/python-modules/sortedcontainers/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 - , fetchPypi 3 + , fetchFromGitHub 4 + , pytestCheckHook 4 5 }: 5 6 6 - buildPythonPackage rec { 7 - pname = "sortedcontainers"; 8 - version = "2.4.0"; 7 + let 8 + sortedcontainers = buildPythonPackage rec { 9 + pname = "sortedcontainers"; 10 + version = "2.4.0"; 9 11 10 - src = fetchPypi { 11 - inherit pname version; 12 - sha256 = "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"; 12 + src = fetchFromGitHub { 13 + owner = "grantjenks"; 14 + repo = "python-sortedcontainers"; 15 + rev = "v${version}"; 16 + sha256 = "sha256-YRbSM2isWi7AzfquFvuZBlpEMNUnBJTBLBn0/XYVHKQ="; 17 + }; 18 + 19 + doCheck = false; 20 + 21 + checkInputs = [ 22 + pytestCheckHook 23 + ]; 24 + 25 + pythonImportsCheck = [ "sortedcontainers" ]; 26 + 27 + passthru.tests = { 28 + pytest = sortedcontainers.overridePythonAttrs (_: { doCheck = true; }); 29 + }; 30 + 31 + meta = with lib; { 32 + description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet"; 33 + homepage = "https://grantjenks.com/docs/sortedcontainers/"; 34 + license = licenses.asl20; 35 + maintainers = with maintainers; [ SuperSandro2000 ]; 36 + }; 13 37 }; 14 - 15 - # pypi tarball does not come with tests 16 - doCheck = false; 17 - 18 - meta = { 19 - description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet"; 20 - homepage = "http://www.grantjenks.com/docs/sortedcontainers/"; 21 - license = lib.licenses.asl20; 22 - maintainers = with lib.maintainers; [ costrouc ]; 23 - }; 24 - } 38 + in 39 + sortedcontainers