From b23cbd820f174da25c6ff9a65f4593cdf89de521 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 30 Dec 2024 17:02:47 +0900 Subject: [PATCH] python312Packages.zope-hookable: 6.0 -> 7.0 Changelog: https://github.com/zopefoundation/zope.hookable/blob/7.0/CHANGES.rst --- .../python-modules/zope-hookable/default.nix | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/zope-hookable/default.nix b/pkgs/development/python-modules/zope-hookable/default.nix index 8af1d3d0b752..66f599332f22 100644 --- a/pkgs/development/python-modules/zope-hookable/default.nix +++ b/pkgs/development/python-modules/zope-hookable/default.nix @@ -1,29 +1,42 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, setuptools, - zope-testing, + unittestCheckHook, }: buildPythonPackage rec { pname = "zope-hookable"; - version = "6.0"; + version = "7.0"; pyproject = true; - src = fetchPypi { - pname = "zope.hookable"; - inherit version; - hash = "sha256-FmiZPUCnz9yGeEPdVyWSnn+DpbDBlccJrx2u+CdPQ8s="; + src = fetchFromGitHub { + owner = "zopefoundation"; + repo = "zope.hookable"; + tag = version; + hash = "sha256-qJJc646VSdNKors6Au4UAGvm7seFbvjEfpdqf//vJNE="; }; - nativeBuildInputs = [ setuptools ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools<74" "setuptools" + ''; - nativeCheckInputs = [ zope-testing ]; + build-system = [ setuptools ]; + + pythonImportsCheck = [ "zope.hookable" ]; + + nativeCheckInputs = [ unittestCheckHook ]; + + unittestFlagsArray = [ "src/zope/hookable/tests" ]; + + pythonNamespaces = [ "zope" ]; meta = with lib; { description = "Supports the efficient creation of “hookable” objects"; homepage = "https://github.com/zopefoundation/zope.hookable"; + changelog = "https://github.com/zopefoundation/zope.hookable/blob/${src.tag}/CHANGES.rst"; license = licenses.zpl21; }; }