Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions pkgs/development/python-modules/asn1tools/default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
{
lib,
bitstruct,
buildPythonPackage,
diskcache,
fetchFromGitHub,
prompt-toolkit,

# build-system
setuptools,

# dependencies
bitstruct,
pyparsing,

# optional-dependencies
prompt-toolkit,
diskcache,

# tests
pytest-xdist,
pytestCheckHook,
pythonOlder,
setuptools,
versionCheckHook,
}:

buildPythonPackage rec {
pname = "asn1tools";
version = "0.167.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "eerimoq";
repo = "asn1tools";
Expand All @@ -41,21 +47,33 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytest-xdist
pytestCheckHook
versionCheckHook
] ++ lib.flatten (builtins.attrValues optional-dependencies);
versionCheckProgramArg = [ "--version" ];

pythonImportsCheck = [ "asn1tools" ];

disabledTests = [
# assert exact error message of pyparsing which changed and no longer matches
# https://github.com/eerimoq/asn1tools/issues/167
"test_parse_error"

# IndexError: string index out of range
# https://github.com/eerimoq/asn1tools/issues/191
"test_c_source"
"test_command_line_generate_c_source_oer"
"test_missing_parameterized_value"
"test_parse_parameterization"
# SystemExit: error: string index out of range
"test_command_line_generate_c_source_uper"
"test_command_line_generate_rust_source_uper"
];

meta = with lib; {
meta = {
description = "ASN.1 parsing, encoding and decoding";
homepage = "https://github.com/eerimoq/asn1tools";
changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}";
license = licenses.mit;
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "asn1tools";
};
Expand Down
14 changes: 11 additions & 3 deletions pkgs/development/python-modules/eth-account/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
setuptools,

# dependencies
bitarray,
ckzg,
Expand All @@ -14,7 +17,8 @@
hexbytes,
rlp,
websockets,
# nativeCheckInputs

# tests
hypothesis,
pydantic,
pytestCheckHook,
Expand All @@ -23,14 +27,14 @@

buildPythonPackage rec {
pname = "eth-account";
version = "0.13.4";
version = "0.13.5";
pyproject = true;

src = fetchFromGitHub {
owner = "ethereum";
repo = "eth-account";
tag = "v${version}";
hash = "sha256-Y55WCgWJd2AaDNKbyBe9oi1soT19RdUjQWy5884Pcq8=";
hash = "sha256-CBD0vJLYA+3FreOTsVXJlDJhRvPbDUn4X55o6EF+uBA=";
};

build-system = [ setuptools ];
Expand Down Expand Up @@ -60,8 +64,12 @@ buildPythonPackage rec {
"test_messages_where_all_3_sigs_match"
"test_messages_where_eth_account_matches_ethers_but_not_metamask"
"test_messages_where_eth_account_matches_metamask_but_not_ethers"

# disable flaky fuzzing test
"test_compatibility"

# Attempts at installing the wheel
"test_install_local_wheel"
];

pythonImportsCheck = [ "eth_account" ];
Expand Down
49 changes: 34 additions & 15 deletions pkgs/development/python-modules/web3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
setuptools,

# dependencies
aiohttp,
eth-abi,
Expand All @@ -11,45 +14,47 @@
eth-typing,
eth-utils,
hexbytes,
ipfshttpclient,
jsonschema,
lru-dict,
protobuf,
pydantic,
requests,
types-requests,
websockets,
# nativeCheckInputs

# optional-dependencies
ipfshttpclient,

# tests
eth-tester,
flaky,
hypothesis,
py-evm,
pytest-asyncio_0_21,
pytestCheckHook,
pytest-mock,
pytest-xdist,
pytestCheckHook,
pyunormalize,
}:

buildPythonPackage rec {
pname = "web3";
version = "7.6.1";
version = "7.8.0";
pyproject = true;

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

# Note: to reflect the extra_requires in main/setup.py.
optional-dependencies = {
ipfs = [ ipfshttpclient ];
hash = "sha256-Rk12QZK47oF0ri1+kCquW4vaqPPPO5UPYOhq4StR1+U=";
};

build-system = [ setuptools ];

pythonRelaxDeps = [
"websockets"
];

dependencies =
[
aiohttp
Expand All @@ -71,39 +76,53 @@ buildPythonPackage rec {
websockets
];

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

nativeCheckInputs = [
eth-tester
flaky
hypothesis
py-evm
pytest-asyncio_0_21
pytestCheckHook
pytest-mock
pytest-xdist
pytestCheckHook
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"
"test_init_multiple_contracts_performance"

# AssertionError: assert '/build/geth.ipc' == '/tmp/geth.ipc
"test_get_dev_ipc_path"

# Require network access
"test_websocket_provider_timeout"
];

disabledTestPaths = [
# requires geth library and binaries
"tests/integration/go_ethereum"

# requires local running beacon node
"tests/beacon"
];

pythonImportsCheck = [ "web3" ];

meta = with lib; {
meta = {
description = "Python interface for interacting with the Ethereum blockchain and ecosystem";
homepage = "https://web3py.readthedocs.io/";
license = licenses.mit;
maintainers = with maintainers; [ hellwolf ];
changelog = "https://web3py.readthedocs.io/en/stable/release_notes.html";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hellwolf ];
};
}