superfile: 1.1.6 -> 1.1.7 (#371308)
[NixPkgs.git] / pkgs / development / python-modules / web3 / default.nix
blob08fc850f9e507c9a47f74591b1b7982b9db9eb8f
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   aiohttp,
7   eth-abi,
8   eth-account,
9   eth-hash,
10   eth-typing,
11   eth-utils,
12   hexbytes,
13   ipfshttpclient,
14   jsonschema,
15   lru-dict,
16   protobuf,
17   requests,
18   websockets,
21 buildPythonPackage rec {
22   pname = "web3";
23   version = "6.5.0";
24   format = "setuptools";
26   disabled = pythonOlder "3.7";
28   src = fetchFromGitHub {
29     owner = "ethereum";
30     repo = "web3.py";
31     rev = "v${version}";
32     hash = "sha256-RNWCZQjcse415SSNkHhMWckDcBJGFZnjisckF7gbYY8=";
33   };
35   # Note: to reflect the extra_requires in main/setup.py.
36   optional-dependencies = {
37     ipfs = [ ipfshttpclient ];
38   };
40   propagatedBuildInputs =
41     [
42       aiohttp
43       eth-abi
44       eth-account
45       eth-hash
46     ]
47     ++ eth-hash.optional-dependencies.pycryptodome
48     ++ [
49       eth-typing
50       eth-utils
51       hexbytes
52       jsonschema
53       lru-dict
54       protobuf
55       requests
56       websockets
57     ];
59   # TODO: package eth-tester required for tests
60   doCheck = false;
62   postPatch = ''
63     substituteInPlace setup.py --replace "types-protobuf==3.19.13" "types-protobuf"
64   '';
66   pythonImportsCheck = [ "web3" ];
68   meta = with lib; {
69     description = "Python interface for interacting with the Ethereum blockchain and ecosystem";
70     homepage = "https://web3py.readthedocs.io/";
71     license = licenses.mit;
72     maintainers = with maintainers; [ hellwolf ];
73   };