python3Packages.token-bucket: 0.3.0 -> 0.4.0

https://github.com/falconry/token-bucket/releases/tag/0.4.0
This commit is contained in:
Martin Weinelt
2026-06-13 01:54:07 +02:00
parent 1eee1a273e
commit d3cf8e3f33
@@ -3,38 +3,23 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "token-bucket";
version = "0.3.0";
version = "0.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "falconry";
repo = "token-bucket";
tag = version;
hash = "sha256-dazqJRpC8FUHOhgKFzDnIl5CT2L74J2o2Hsm0IQf4Cg=";
tag = finalAttrs.version;
hash = "sha256-ZWmrLZ3CsotGAoVdbVTz7YNrBHfCKR5t94wrdVMM3P4=";
};
patches = [
# Replace imp with importlib, https://github.com/falconry/token-bucket/pull/24
(fetchpatch {
name = "remove-imp.patch";
url = "https://github.com/falconry/token-bucket/commit/10a3c9f4de00f4933349f66b4c72b6c96db6e766.patch";
hash = "sha256-Hk5+i3xzeA3F1kXRaRarWT9mff2lT2WNmTfTZvYzGYI=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
'';
nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
@@ -43,8 +28,8 @@ buildPythonPackage rec {
meta = {
description = "Token Bucket Implementation for Python Web Apps";
homepage = "https://github.com/falconry/token-bucket";
changelog = "https://github.com/falconry/token-bucket/releases/tag/${version}";
changelog = "https://github.com/falconry/token-bucket/releases/tag/${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hexa ];
};
}
})