depot/third_party/nixpkgs/pkgs/development/python-modules/async-interrupt/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

46 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "async-interrupt";
version = "1.1.2";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bdraco";
repo = "async_interrupt";
rev = "refs/tags/v${version}";
hash = "sha256-CFCWlIx4iAG6gW2ORRYfZpFWRvjukqdcR2yg6NjVqps=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=async_interrupt --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [ poetry-core ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "async_interrupt" ];
meta = with lib; {
description = "Context manager to raise an exception when a future is done";
homepage = "https://github.com/bdraco/async_interrupt";
changelog = "https://github.com/bdraco/async_interrupt/blob/${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}