python313Packages.whey: follow contributing guidelines

+36 -10
+36 -10
pkgs/development/python-modules/whey/default.nix
··· 1 1 { 2 2 buildPythonPackage, 3 - fetchPypi, 3 + fetchFromGitHub, 4 4 lib, 5 5 setuptools, 6 6 attrs, 7 7 click, 8 8 consolekit, 9 9 dist-meta, 10 + docutils, 10 11 dom-toml, 11 12 domdf-python-tools, 13 + editables, 12 14 handy-archives, 13 15 natsort, 14 16 packaging, 15 17 pyproject-parser, 18 + pytestCheckHook, 16 19 shippinglabel, 17 20 }: 21 + 18 22 buildPythonPackage rec { 19 23 pname = "whey"; 20 24 version = "0.1.1"; 21 25 pyproject = true; 22 26 23 - src = fetchPypi { 24 - inherit pname version; 25 - hash = "sha256-l72fjczuuDXg/cDiqJ7roNVm4X+au+1u4AA8Szs1bNo="; 27 + src = fetchFromGitHub { 28 + owner = "repo-helper"; 29 + repo = "whey"; 30 + tag = "v${version}"; 31 + hash = "sha256-s2jZmuFj0gTWVTcXWcBhcu5RBuaf/qMS/xzIpIoG1ZE="; 26 32 }; 33 + 34 + postPatch = '' 35 + substituteInPlace pyproject.toml \ 36 + --replace-fail 'setuptools!=61.*,<=67.1.0,>=40.6.0' setuptools 37 + ''; 27 38 28 39 build-system = [ setuptools ]; 29 40 ··· 41 52 shippinglabel 42 53 ]; 43 54 44 - postPatch = '' 45 - substituteInPlace pyproject.toml \ 46 - --replace-fail '"setuptools!=61.*,<=67.1.0,>=40.6.0"' '"setuptools"' 47 - ''; 55 + pythonImportsCheck = [ "whey" ]; 56 + 57 + optional-dependencies = { 58 + all = lib.flatten (lib.attrValues (lib.filterAttrs (n: v: n != "all") optional-dependencies)); 59 + editable = [ 60 + editables 61 + ]; 62 + readme = [ 63 + docutils 64 + pyproject-parser 65 + ] ++ pyproject-parser.optional-dependencies.readme; 66 + }; 67 + 68 + nativeCheckInputs = [ 69 + pytestCheckHook 70 + ]; 71 + 72 + # missing dependency pyproject-examples 73 + doCheck = false; 48 74 49 75 meta = { 50 - description = "A simple Python wheel builder for simple projects."; 51 - homepage = "https://pypi.org/project/whey"; 76 + description = "Simple Python wheel builder for simple projects"; 77 + homepage = "https://github.com/repo-helper/whey"; 52 78 license = lib.licenses.mit; 53 79 maintainers = with lib.maintainers; [ tyberius-prime ]; 54 80 };