1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest-asyncio,
7 pytest-cov-stub,
8 pytestCheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "async-interrupt";
14 version = "1.2.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "bdraco";
21 repo = "async_interrupt";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-opV5h3aLDDpjlRZRZ9OnrPjUOf/i7g+B9T6msk8wtgI=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 nativeCheckInputs = [
29 pytest-asyncio
30 pytest-cov-stub
31 pytestCheckHook
32 ];
33
34 pythonImportsCheck = [ "async_interrupt" ];
35
36 meta = with lib; {
37 description = "Context manager to raise an exception when a future is done";
38 homepage = "https://github.com/bdraco/async_interrupt";
39 changelog = "https://github.com/bdraco/async_interrupt/blob/${version}/CHANGELOG.md";
40 license = licenses.asl20;
41 maintainers = with maintainers; [ fab ];
42 };
43}