at 25.11-pre 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cached-property, 6 eth-typing, 7 eth-utils, 8 pytestCheckHook, 9 pythonAtLeast, 10 pythonOlder, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "py-ecc"; 16 version = "7.0.0"; 17 pyproject = true; 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "ethereum"; 22 repo = "py_ecc"; 23 rev = "v${version}"; 24 hash = "sha256-DKe+bI1GEzXg4Y4n5OA1/hWYz9L3X1AvaOFPEnCaAfs="; 25 }; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ 30 cached-property 31 eth-typing 32 eth-utils 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 disabledTests = lib.optionals (pythonAtLeast "3.12") [ 38 # https://github.com/ethereum/py_ecc/issues/133 39 "test_FQ2_object" 40 "test_pairing_bilinearity_on_G1" 41 "test_pairing_bilinearity_on_G2" 42 "test_pairing_composit_check" 43 "test_pairing_is_non_degenerate" 44 "test_pairing_negative_G1" 45 "test_pairing_negative_G2" 46 "test_pairing_output_order" 47 ]; 48 49 pythonImportsCheck = [ "py_ecc" ]; 50 51 meta = with lib; { 52 changelog = "https://github.com/ethereum/py_ecc/blob/${src.rev}/CHANGELOG.rst"; 53 description = "ECC pairing and bn_128 and bls12_381 curve operations"; 54 homepage = "https://github.com/ethereum/py_ecc"; 55 license = licenses.mit; 56 maintainers = [ ]; 57 }; 58}