1{
2 lib,
3 anyio,
4 buildPythonPackage,
5 dirty-equals,
6 fetchFromGitHub,
7 hatch-fancy-pypi-readme,
8 hatch-vcs,
9 hatchling,
10 pytestCheckHook,
11 tenacity,
12 typing-extensions,
13}:
14
15buildPythonPackage rec {
16 pname = "stamina";
17 version = "25.1.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "hynek";
22 repo = "stamina";
23 tag = version;
24 hash = "sha256-TehGqR3vbjLNByHZE2+Ytq52dpEpiL6+7TRUKwXcC1M=";
25 };
26
27 build-system = [
28 hatch-fancy-pypi-readme
29 hatch-vcs
30 hatchling
31 ];
32
33 dependencies = [
34 tenacity
35 typing-extensions
36 ];
37
38 nativeCheckInputs = [
39 anyio
40 dirty-equals
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "stamina" ];
45
46 meta = with lib; {
47 description = "Production-grade retries for Python";
48 homepage = "https://github.com/hynek/stamina";
49 changelog = "https://github.com/hynek/stamina/blob/${src.tag}/CHANGELOG.md";
50 license = licenses.mit;
51 maintainers = with maintainers; [ mbalatsko ];
52 };
53}