python311Packages.merkletools: remove pysha3

This commit is contained in:
Fabian Affolter 2023-01-21 16:07:43 +01:00
parent 0838fa3aba
commit 7221014609

View file

@ -1,19 +1,42 @@
{ lib, buildPythonPackage, fetchPypi, pysha3 }: { lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "merkletools"; pname = "merkletools";
version = "1.0.3"; version = "1.0.3";
format = "setuptools";
src = fetchPypi { disabled = pythonOlder "3.7";
inherit pname version;
sha256 = "0pdik5sil0xcrwdcgdfy86c5qcfrz24r0gfc8m8bxa0i7h7x2v9l"; src = fetchFromGitHub {
owner = "Tierion";
repo = "pymerkletools";
rev = "refs/tags/${version}";
hash = "sha256-pd7Wxi7Sk95RcrFOTOtl725nIXidva3ftdKSGxHYPTA=";
}; };
propagatedBuildInputs = [ pysha3 ]; postPatch = ''
# pysha3 is deprecated and not needed for Python > 3.6
substituteInPlace setup.py \
--replace "install_requires=install_requires" "install_requires=[],"
'';
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"merkletools"
];
meta = with lib; { meta = with lib; {
description = "Python tools for creating Merkle trees, generating Merkle proofs, and verification of Merkle proofs"; description = "Python tools for creating Merkle trees, generating Merkle proofs, and verification of Merkle proofs";
homepage = "https://github.com/Tierion/pymerkletools"; homepage = "https://github.com/Tierion/pymerkletools";
changelog = "https://github.com/Tierion/pymerkletools/releases/tag/${version}";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ Madouura ]; maintainers = with maintainers; [ Madouura ];
}; };