This treewide change targets Python packages that specifies pytest flags with pytestFlagsArray, and whose flags cannot be consructed by other pytestCheckHook-honoured arguments. Use the __structuredAttrs-agnostic argument pytestFlags instead of the deprecated pytestFlagsArray. For flags with option arguments, join each flag and their option argument into a single command-line argument following POSIX Utility Argument Syntax[1] for easier overriding (remove/replace). Examples: * [ "-W" "ignore:message:WarningClass" ] -> [ "-Wignore:message:WarningClass" ] * [ "--reruns" "3" ] -> [ "--reruns=3" ] [1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
49 lines
985 B
Nix
49 lines
985 B
Nix
{
|
|
lib,
|
|
aiohttp,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pytest-aiohttp,
|
|
pythonOlder,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aiohttp-retry";
|
|
version = "2.9.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "inyutin";
|
|
repo = "aiohttp_retry";
|
|
tag = "v${version}";
|
|
hash = "sha256-8S4gjeN8ktdDNd8GUsejaZdCaG/VXYPo0RJpwrrttGQ=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ aiohttp ];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
nativeCheckInputs = [
|
|
pytest-aiohttp
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "aiohttp_retry" ];
|
|
|
|
pytestFlags = [ "--asyncio-mode=auto" ];
|
|
|
|
meta = with lib; {
|
|
description = "Retry client for aiohttp";
|
|
homepage = "https://github.com/inyutin/aiohttp_retry";
|
|
changelog = "https://github.com/inyutin/aiohttp_retry/releases/tag/${src.tag}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|