python310Packages.web3: 5.30.0 -> 5.31.1

This commit is contained in:
Fabian Affolter 2022-10-08 10:38:15 +02:00
parent a0bec14d9a
commit 6c2364b160

View File

@ -20,36 +20,32 @@
# , py-geth
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
}:
buildPythonPackage rec {
pname = "web3";
version = "5.30.0";
disabled = pythonOlder "3.6";
version = "5.31.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ethereum";
repo = "web3.py";
rev = "v${version}";
sha256 = "sha256-HajumvOG18r7TslkmCfI0iiLsEddevGrRZQFWICGeYE=";
hash = "sha256-YsAbPI9Y6z+snKZ9NsA0YSpB38n+ra4+Ei6COYFe8v4=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "eth-account>=0.5.7,<0.6.0" "eth-account>=0.5.7,<0.7" \
--replace "eth-utils>=1.9.5,<2.0.0" "eth-utils>=1.9.5,<3" \
--replace "eth-rlp<0.3" "eth-rlp<0.4" \
--replace "websockets>=9.1,<10" "websockets>=9.1,<11" \
--replace "eth-abi>=2.0.0b6,<3.0.0" "eth-abi>=2.0.0b6,<4" \
--replace "eth-typing>=2.0.0,<3.0.0" "eth-typing>=2.0.0,<4"
'';
nativeBuildInputs = [
pythonRelaxDepsHook
];
propagatedBuildInputs = [
aiohttp
eth-abi
eth-account
eth-hash
eth-hash.optional-dependencies.pycryptodome
eth-rlp
eth-typing
eth-utils
@ -60,7 +56,11 @@ buildPythonPackage rec {
protobuf
requests
websockets
] ++ lib.optional (pythonOlder "3.8") [ typing-extensions ];
] ++ lib.optional (pythonOlder "3.8") [
typing-extensions
] ++ eth-hash.optional-dependencies.pycryptodome;
pythonRelaxDeps = true;
# TODO: package eth-tester
#checkInputs = [
@ -72,7 +72,9 @@ buildPythonPackage rec {
doCheck = false;
pythonImportsCheck = [ "web3" ];
pythonImportsCheck = [
"web3"
];
meta = with lib; {
description = "Web3 library for interactions";