Skip to content

Commit

Permalink
python312Packages.web3: 6.5.0 -> 7.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianFranzen authored and hellwolf committed Jan 14, 2025
1 parent 2343a73 commit 2c467f3
Showing 1 changed file with 45 additions and 12 deletions.
57 changes: 45 additions & 12 deletions pkgs/development/python-modules/web3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,48 @@
eth-abi,
eth-account,
eth-hash,
eth-tester,
eth-typing,
eth-utils,
flaky,
hexbytes,
hypothesis,
ipfshttpclient,
jsonschema,
lru-dict,
protobuf,
pydantic,
pytestCheckHook,
pytest-asyncio_0_21,
pytest-mock,
pytest-xdist,
pyunormalize,
py-evm,
requests,
setuptools,
types-requests,
websockets,
}:

buildPythonPackage rec {
pname = "web3";
version = "6.5.0";
format = "setuptools";

disabled = pythonOlder "3.7";
version = "7.6.1";

src = fetchFromGitHub {
owner = "ethereum";
repo = "web3.py";
rev = "v${version}";
hash = "sha256-RNWCZQjcse415SSNkHhMWckDcBJGFZnjisckF7gbYY8=";
tag = "v${version}";
hash = "sha256-rpXSkQtqUZiCLMF2XlElbsjFjJmX+3j/NdAU2oaPU54=";
};

# Note: to reflect the extra_requires in main/setup.py.
optional-dependencies = {
ipfs = [ ipfshttpclient ];
};

propagatedBuildInputs =
build-system = [ setuptools ];

dependencies =
[
aiohttp
eth-abi
Expand All @@ -52,16 +63,38 @@ buildPythonPackage rec {
jsonschema
lru-dict
protobuf
pydantic
requests
types-requests
websockets
];

# TODO: package eth-tester required for tests
doCheck = false;
nativeCheckInputs = [
pytestCheckHook
eth-tester
flaky
hypothesis
pytest-asyncio_0_21
pytest-mock
pytest-xdist
pyunormalize
py-evm
];

disabledTests = [
# side-effect: runs pip online check and is blocked by sandbox
"test_install_local_wheel"
# not sure why they fail
"test_init_multiple_contracts_performance"
"test_async_init_multiple_contracts_performance"
];

postPatch = ''
substituteInPlace setup.py --replace "types-protobuf==3.19.13" "types-protobuf"
'';
disabledTestPaths = [
# requires geth library and binaries
"tests/integration/go_ethereum"
# requires local running beacon node
"tests/beacon"
];

pythonImportsCheck = [ "web3" ];

Expand Down

0 comments on commit 2c467f3

Please sign in to comment.