1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6}:
7
8buildPythonPackage rec {
9 pname = "safe-pysha3";
10 version = "1.0.4";
11 format = "setuptools";
12 disabled = pythonOlder "3.8";
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-5CkUax7dGYssqTSiBGplZWxdMbDsiUu9YFUSf03q/xc=";
17 };
18
19 # AttributeError: 'Keccak_224Tests' object has no attribute 'failIf'.
20 postPatch = ''
21 substituteInPlace tests.py \
22 --replace "failIf" "assertFalse"
23 '';
24
25 pythonImportsCheck = [ "sha3" ];
26
27 meta = {
28 changelog = "https://github.com/5afe/pysha3/releases/tag/v${version}";
29 description = "SHA-3 (Keccak) for Python 3.9 - 3.11";
30 homepage = "https://github.com/5afe/pysha3";
31 license = lib.licenses.psfl;
32 maintainers = with lib.maintainers; [ wegank ];
33 };
34}