nixpkgs/pkgs/development/python-modules/aiojobs/default.nix
Fabian Affolter 050586bf16
Merge pull request #212129 from fabaff/aiojobs-fix
python310Packages.aiojobs: fix build
2023-01-22 19:15:29 +01:00

57 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 ];
};
}