Skip to content

Commit

Permalink
python312Packages.web3: 6.5.0 -> 7.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianFranzen authored and hellwolf committed Jan 18, 2025
1 parent d261408 commit 088d709
Showing 1 changed file with 48 additions and 13 deletions.
61 changes: 48 additions & 13 deletions pkgs/development/python-modules/web3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
# dependencies
aiohttp,
eth-abi,
eth-account,
Expand All @@ -14,30 +15,42 @@
jsonschema,
lru-dict,
protobuf,
pydantic,
requests,
types-requests,
websockets,
# nativeCheckInputs
eth-tester,
flaky,
hypothesis,
py-evm,
pytest-asyncio_0_21,
pytestCheckHook,
pytest-mock,
pytest-xdist,
pyunormalize,
}:

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

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

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 +65,38 @@ buildPythonPackage rec {
jsonschema
lru-dict
protobuf
pydantic
requests
types-requests
websockets
];

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

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 088d709

Please sign in to comment.