Merge pull request #290981 from dotlambda/autobahn-fix

python311Packages.autobahn: fix tests
This commit is contained in:
Martin Weinelt 2024-02-24 01:52:36 +01:00 committed by GitHub
commit 5faa932cc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 84 additions and 22 deletions

View File

@ -27,7 +27,7 @@
, pygobject3
, pyopenssl
, qrcode
, pytest-asyncio
, pytest-asyncio_0_21
, python-snappy
, pytestCheckHook
, pythonOlder
@ -72,7 +72,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
mock
pytest-asyncio
pytest-asyncio_0_21
pytestCheckHook
] ++ passthru.optional-dependencies.scram
++ passthru.optional-dependencies.serialization

View File

@ -3,12 +3,13 @@
, buildPythonPackage
, pythonOlder
, pytestCheckHook
, setuptools
}:
buildPythonPackage rec {
pname = "eth-typing";
version = "3.2.0";
format = "setuptools";
version = "4.0.0";
pyproject = true;
disabled = pythonOlder "3.6";
@ -16,9 +17,13 @@ buildPythonPackage rec {
owner = "ethereum";
repo = "eth-typing";
rev = "refs/tags/v${version}";
hash = "sha256-klN38pIQ9ZOFV7dzXNvylPGfifR8pXRLTJ3VE579AY0=";
hash = "sha256-JT/2bCPYFSRNt3V7QnHSAJR7HrZ1JpRKdU7gQpoYIn0=";
};
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];

View File

@ -8,22 +8,27 @@
, isPyPy
, pytestCheckHook
, pythonOlder
, setuptools
, toolz
}:
buildPythonPackage rec {
pname = "eth-utils";
version = "2.1.1";
format = "setuptools";
version = "4.0.0";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "ethereum";
repo = pname;
repo = "eth-utils";
rev = "v${version}";
hash = "sha256-Ogp4o99smw5qVwDec6zd/xVqqKMyNk41iBfRNzrwuvE=";
hash = "sha256-k2pHM1eKPzoGxZlU6yT7bZMv4CCWGaZaSnFHSbT76Zo=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
eth-hash
eth-typing
@ -44,6 +49,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "eth_utils" ];
meta = {
changelog = "https://github.com/ethereum/eth-utils/blob/${src.rev}/docs/release_notes.rst";
description = "Common utility functions for codebases which interact with ethereum";
homepage = "https://github.com/ethereum/eth-utils";
license = lib.licenses.mit;

View File

@ -4,38 +4,55 @@
, cached-property
, eth-typing
, eth-utils
, mypy-extensions
, pytestCheckHook
, pythonAtLeast
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "py-ecc";
version = "6.0.0";
format = "setuptools";
disabled = pythonOlder "3.6";
version = "7.0.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ethereum";
repo = "py_ecc";
rev = "v${version}";
hash = "sha256-638otYA3e/Ld4mcM69yrqHQnGoK/Sfl/UA9FWnjgO/U=";
hash = "sha256-DKe+bI1GEzXg4Y4n5OA1/hWYz9L3X1AvaOFPEnCaAfs=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
cached-property
eth-typing
eth-utils
mypy-extensions
];
nativeCheckInputs = [
pytestCheckHook
];
disabledTests = lib.optionals (pythonAtLeast "3.12") [
# https://github.com/ethereum/py_ecc/issues/133
"test_FQ2_object"
"test_pairing_bilinearity_on_G1"
"test_pairing_bilinearity_on_G2"
"test_pairing_composit_check"
"test_pairing_is_non_degenerate"
"test_pairing_negative_G1"
"test_pairing_negative_G2"
"test_pairing_output_order"
];
pythonImportsCheck = [ "py_ecc" ];
meta = with lib; {
changelog = "https://github.com/ethereum/py_ecc/blob/${src.rev}/CHANGELOG.rst";
description = "ECC pairing and bn_128 and bls12_381 curve operations";
homepage = "https://github.com/ethereum/py_ecc";
license = licenses.mit;

View File

@ -1,26 +1,50 @@
{ lib, buildPythonPackage, fetchPypi, hkdf, pytest }:
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch2
, setuptools
, hkdf
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "spake2";
version = "0.8";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "c17a614b29ee4126206e22181f70a406c618d3c6c62ca6d6779bce95e9c926f4";
};
nativeCheckInputs = [ pytest ];
patches = [
# https://github.com/warner/python-spake2/pull/16
(fetchpatch2 {
name = "python312-compat.patch";
url = "https://github.com/warner/python-spake2/commit/1b04d33106b105207c97c64b2589c45790720b0b.patch";
hash = "sha256-OoBz0lN17VyVGg6UfT+Zj9M1faFTNpPIhxrwCgUwMc8=";
})
];
propagatedBuildInputs = [ hkdf ];
nativeBuildInputs = [
setuptools
];
checkPhase = ''
py.test $out
'';
propagatedBuildInputs = [
hkdf
];
pythonImportsCheck = [ "spake2" ];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
changelog = "https://github.com/warner/python-spake2/blob/v${version}/NEWS";
description = "SPAKE2 password-authenticated key exchange library";
homepage = "https://github.com/warner/python-spake2";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}

View File

@ -11614,6 +11614,16 @@ self: super: with self; {
pytest-asyncio = callPackage ../development/python-modules/pytest-asyncio { };
pytest-asyncio_0_21 = pytest-asyncio.overridePythonAttrs (old: rec {
version = "0.21.1";
src = pkgs.fetchFromGitHub {
owner = "pytest-dev";
repo = "pytest-asyncio";
rev = "refs/tags/v${version}";
hash = "sha256-Wpo8MpCPGiXrckT2x5/yBYtGlzso/L2urG7yGc7SPkA=";
};
});
pytest-bdd = callPackage ../development/python-modules/pytest-bdd { };
pytest-benchmark = callPackage ../development/python-modules/pytest-benchmark { };