From adf532bfdcf5bbe9ce6099fec32447e4211f016f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 9 Jun 2023 13:48:27 +0200 Subject: [PATCH] python311Packages.pycategories: remove pytest-runner - remove pytest-cov - add changelog to meta --- .../python-modules/pycategories/default.nix | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pycategories/default.nix b/pkgs/development/python-modules/pycategories/default.nix index 8d41b7f4ee42..6586f598ca0a 100644 --- a/pkgs/development/python-modules/pycategories/default.nix +++ b/pkgs/development/python-modules/pycategories/default.nix @@ -1,34 +1,42 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , callPackage -, pytest-cov , fetchPypi -, lib -, pytest +, pytestCheckHook , pythonOlder -, pytest-runner }: buildPythonPackage rec { pname = "pycategories"; version = "1.2.0"; - disabled = pythonOlder "3.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "bd70ecb5e94e7659e564ea153f0c7673291dc37c526c246800fc08d6c5378099"; + hash = "sha256-vXDstelOdlnlZOoVPwx2cykdw3xSbCRoAPwI1sU3gJk="; }; - nativeBuildInputs = [ pytest-runner ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" + substituteInPlace setup.cfg \ + --replace "--cov-report term --cov=categories" "" + ''; # Is private because the author states it's unmaintained # and shouldn't be used in production code propagatedBuildInputs = [ (callPackage ./infix.nix { }) ]; - nativeCheckInputs = [ pytest pytest-cov ]; + nativeCheckInputs = [ + pytestCheckHook + ]; meta = with lib; { - homepage = "https://gitlab.com/danielhones/pycategories"; description = "Implementation of some concepts from category theory"; + homepage = "https://gitlab.com/danielhones/pycategories"; + changelog = "https://gitlab.com/danielhones/pycategories/-/blob/v${version}/CHANGELOG.rst"; license = licenses.mit; maintainers = with maintainers; [ dmvianna ]; };