depot/third_party/nixpkgs/pkgs/development/python-modules/aiojobs/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

56 lines
1.1 KiB
Nix

{ lib
, aiohttp
, async-timeout
, buildPythonPackage
, fetchFromGitHub
, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "aiojobs";
version = "1.1.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "aio-libs";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-FHdEVt/XXmuTrPAETyod3fHJIK1wg957/+QMAhZG1xk=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=aiojobs/ --cov=tests/" ""
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
aiohttp
async-timeout
];
nativeCheckInputs = [
pytestCheckHook
pytest-aiohttp
];
pythonImportsCheck = [
"aiojobs"
];
meta = with lib; {
description = "Jobs scheduler for managing background task (asyncio)";
homepage = "https://github.com/aio-libs/aiojobs";
changelog = "https://github.com/aio-libs/aiojobs/blob/v${version}/CHANGES.rst";
license = licenses.asl20;
maintainers = with maintainers; [ cmcdragonkai ];
};
}