From 3b1e90660e185513734dc4721b1aeacafeb79b7d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 8 Jun 2023 20:38:12 +0200 Subject: [PATCH] python311Packages.py-multibase: remove pytest-runner - add changelog to meta - add pythonImportsCheck - add format - disable on unsupported Python releases --- .../python-modules/py-multibase/default.nix | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/py-multibase/default.nix b/pkgs/development/python-modules/py-multibase/default.nix index eeb83df5a98b..50f1d9e9b376 100644 --- a/pkgs/development/python-modules/py-multibase/default.nix +++ b/pkgs/development/python-modules/py-multibase/default.nix @@ -1,45 +1,50 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchPypi -, isPy27 -, lib , morphys -, pytest -, pytest-runner +, pytestCheckHook , python-baseconv +, pythonOlder , six }: buildPythonPackage rec { pname = "py-multibase"; version = "1.0.3"; - disabled = isPy27; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version ; - sha256 = "d28a20efcbb61eec28f55827a0bf329c7cea80fffd933aecaea6ae8431267fe4"; + inherit pname version; + hash = "sha256-0oog78u2Huwo9VgnoL8ynHzqgP/9kzrsrqauhDEmf+Q="; }; postPatch = '' - substituteInPlace setup.cfg --replace "[pytest]" "" - substituteInPlace setup.cfg --replace "python_classes = *TestCase" "" + substituteInPlace setup.cfg \ + --replace "[pytest]" "" \ + --replace "python_classes = *TestCase" "" + substituteInPlace setup.py \ + --replace "'pytest-runner'," "" ''; - nativeBuildInputs = [ - pytest-runner - ]; - propagatedBuildInputs = [ morphys - six python-baseconv + six ]; nativeCheckInputs = [ - pytest + pytestCheckHook + ]; + + pythonImportsCheck = [ + "multibase" ]; meta = with lib; { - description = "Multibase is a protocol for distinguishing base encodings and other simple string encodings"; + description = "Module for distinguishing base encodings and other simple string encodings"; homepage = "https://github.com/multiformats/py-multibase"; + changelog = "https://github.com/multiformats/py-multibase/blob/v${version}/HISTORY.rst"; license = licenses.mit; maintainers = with maintainers; [ rakesh4g ]; };