Yueh-Shun Li 76e2a397c2 treewide: pytestFlagsArray -> pytestFlags and join flag and option argument
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
2025-06-16 01:02:16 +08:00

54 lines
1.1 KiB
Nix

{
lib,
anyio,
buildPythonPackage,
fetchFromGitHub,
flit-core,
pytestCheckHook,
pythonOlder,
trio,
}:
buildPythonPackage rec {
pname = "asyncclick";
version = "8.1.8.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "python-trio";
repo = "asyncclick";
tag = "${version}+async";
hash = "sha256-J294pYuNOSm7v2BbwDpzn3uelAnZ3ip2U1gWuchhOtA=";
};
build-system = [ flit-core ];
dependencies = [ anyio ];
nativeCheckInputs = [
pytestCheckHook
trio
];
pytestFlags = [
"-Wignore::trio.TrioDeprecationWarning"
];
disabledTests = [
# AttributeError: 'Context' object has no attribute '_ctx_mgr'
"test_context_pushing"
];
pythonImportsCheck = [ "asyncclick" ];
meta = with lib; {
description = "Python composable command line utility";
homepage = "https://github.com/python-trio/asyncclick";
changelog = "https://github.com/python-trio/asyncclick/blob/${version}/CHANGES.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}