<commit_before>{ lib
, buildPythonPackage
, fetchFromGitHub
, eth-hash
, eth-typing
, eth-utils
, hypothesis
, parsimonious
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "eth-abi";
  version = "3.0.0";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ethereum";
    repo = "eth-abi";
    rev = "v${version}";
    sha256 = "sha256-qiuyGVOy+n8l3jSqwMGnBXcDrOxIiJ0lNP4lq/EQEhU=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "parsimonious>=0.8.0,<0.9.0" "parsimonious"
  '';

  propagatedBuildInputs = [
    eth-typing
    eth-utils
    parsimonious
  ];

  checkInputs = [
    hypothesis
    pytestCheckHook
  ] ++ eth-hash.optional-dependencies.pycryptodome;<commit_msg>python310Packages.eth-abi: 3.0.0 -> 3.0.1<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub
, eth-hash
, eth-typing
, eth-utils
, hypothesis
, parsimonious
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "eth-abi";
  version = "3.0.1";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ethereum";
    repo = "eth-abi";
    rev = "v${version}";
    sha256 = "sha256-xrZpT/9zwDtjSwSPDDse+Aq8plPm26OR/cIrliZUpLY=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "parsimonious>=0.8.0,<0.9.0" "parsimonious"
  '';

  propagatedBuildInputs = [
    eth-typing
    eth-utils
    parsimonious
  ];

  # lots of: TypeError: isinstance() arg 2 must be a type or tuple of types
  doCheck = false;

  checkInputs = [
    hypothesis
    pytestCheckHook
  ] ++ eth-hash.optional-dependencies.pycryptodome;
{'fraction_non_alphanumeric': 0.1358560794044665, 'fraction_numerical': 0.03225806451612903, 'mean_word_length': 3.2559366754617414, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2397333', 'n_tokens_mistral': 663, 'n_tokens_neox': 631, 'n_words': 105}