From a0059ad85216503244ee58e07f92796efa6e7ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 22 Jan 2025 16:04:39 -0800 Subject: [PATCH] python313Packages.whey-pth: follow contributing guidelines --- .../python-modules/whey-pth/default.nix | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/whey-pth/default.nix b/pkgs/development/python-modules/whey-pth/default.nix index c40292ede641f..a389860d1e2d6 100644 --- a/pkgs/development/python-modules/whey-pth/default.nix +++ b/pkgs/development/python-modules/whey-pth/default.nix @@ -1,21 +1,30 @@ { buildPythonPackage, - fetchPypi, + fetchFromGitHub, lib, setuptools, dom-toml, whey, + pytestCheckHook, }: + buildPythonPackage rec { pname = "whey-pth"; version = "0.0.6"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-CIpgqzNXW3VpS+k6BCpc2DNyqwgt/Af3ms59AH/V5KM="; + src = fetchFromGitHub { + owner = "repo-helper"; + repo = "whey-pth"; + tag = "v${version}"; + hash = "sha256-A+bXB9F8FD+A1iRuETIxP12bkH/5NKcx01ERXJZAj+Q="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'setuptools!=61.*,<=67.1.0,>=40.6.0' setuptools + ''; + build-system = [ setuptools ]; dependencies = [ @@ -23,14 +32,18 @@ buildPythonPackage rec { whey ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail '"setuptools!=61.*,<=67.1.0,>=40.6.0"' '"setuptools"' - ''; + pythonImportsCheck = [ "whey_pth" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # missing dependency coincidence + doCheck = false; meta = { - description = "Extension to whey to support .pth files."; - homepage = "https://pypi.org/project/whey-pth"; + description = "Extension to whey to support .pth files"; + homepage = "https://github.com/repo-helper/whey-pth"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ tyberius-prime ]; };