Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / async-interrupt / default.nix
blobb6e16f54963ddc7526ee18a862cdea7a9c8a03cf
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , poetry-core
5 , pytest-asyncio
6 , pytestCheckHook
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "async-interrupt";
12   version = "1.1.1";
13   format = "pyproject";
15   disabled = pythonOlder "3.8";
17   src = fetchFromGitHub {
18     owner = "bdraco";
19     repo = "async_interrupt";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-mbvOj1ybCkDNr3je3PtFwmddkh2k/nHOerpC6hGSUYI=";
22   };
24   postPatch = ''
25     substituteInPlace pyproject.toml \
26       --replace " --cov=async_interrupt --cov-report=term-missing:skip-covered" ""
27   '';
29   nativeBuildInputs = [
30     poetry-core
31   ];
33   nativeCheckInputs = [
34     pytest-asyncio
35     pytestCheckHook
36   ];
38   pythonImportsCheck = [
39     "async_interrupt"
40   ];
42   meta = with lib; {
43     description = "Context manager to raise an exception when a future is done";
44     homepage = "https://github.com/bdraco/async_interrupt";
45     changelog = "https://github.com/bdraco/async_interrupt/blob/${version}/CHANGELOG.md";
46     license = licenses.asl20;
47     maintainers = with maintainers; [ fab ];
48   };