2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stopit";
|
|
|
|
version = "1.1.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# tests are missing from the PyPi tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "glenfant";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-uXJUA70JOGWT2NmS6S7fPrTWAJZ0mZ/hICahIUzjfbw=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools # for pkg_resources
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
pythonImportsCheck = [ "stopit" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Raise asynchronous exceptions in other thread, control the timeout of blocks or callables with a context manager or a decorator";
|
|
|
|
homepage = "https://github.com/glenfant/stopit";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|