python311Packages.token-bucket: add patch to replace imp
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "token-bucket";
|
||||
version = "0.3.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@@ -20,11 +22,24 @@ buildPythonPackage rec {
|
||||
hash = "sha256-dazqJRpC8FUHOhgKFzDnIl5CT2L74J2o2Hsm0IQf4Cg=";
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user