From 02b136a85d5dd1cfa62e5e3efbfce01a86218d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 4 Jun 2022 04:04:45 +0200 Subject: [PATCH] python310Packages.eth-utils: adopt, cleanup --- .../python-modules/eth-utils/default.nix | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/eth-utils/default.nix b/pkgs/development/python-modules/eth-utils/default.nix index 9b26fb7024c0..a5b19123c1ec 100644 --- a/pkgs/development/python-modules/eth-utils/default.nix +++ b/pkgs/development/python-modules/eth-utils/default.nix @@ -1,12 +1,21 @@ -{ lib, fetchFromGitHub, buildPythonPackage, pytestCheckHook, eth-hash, eth-typing, - cytoolz, hypothesis }: +{ lib +, fetchFromGitHub +, buildPythonPackage +, eth-hash +, eth-typing +, cytoolz +, hypothesis +, isPyPy +, pytestCheckHook +, pythonOlder +, toolz +}: buildPythonPackage rec { pname = "eth-utils"; version = "2.0.0"; + disabled = pythonOlder "3.6"; - # Tests are missing from the PyPI source tarball so let's use GitHub - # https://github.com/ethereum/eth-utils/issues/130 src = fetchFromGitHub { owner = "ethereum"; repo = pname; @@ -14,8 +23,17 @@ buildPythonPackage rec { sha256 = "sha256-E2vUROc2FcAv00k50YpdxaaYIRDk1yGSPB8cHHw+7Yw="; }; - checkInputs = [ pytestCheckHook hypothesis ]; - propagatedBuildInputs = [ eth-hash eth-typing cytoolz ]; + propagatedBuildInputs = [ + eth-hash + eth-typing + ] ++ lib.optional (!isPyPy) cytoolz + ++ lib.optional isPyPy toolz; + + + checkInputs = [ + hypothesis + pytestCheckHook + ] ++ eth-hash.optional-dependencies.pycryptodome; pythonImportsCheck = [ "eth_utils" ]; @@ -23,6 +41,6 @@ buildPythonPackage rec { description = "Common utility functions for codebases which interact with ethereum"; homepage = "https://github.com/ethereum/eth-utils"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ jluttine ]; + maintainers = with lib.maintainers; [ SuperSandro2000 ]; }; }