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

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
googleapis-common-protos,
grpcio,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "grpc-google-iam-v1";
version = "0.14.2";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "google-cloud-python";
tag = "grpc-google-iam-v1-v${version}";
hash = "sha256-5PzidE1CWN+pt7+gcAtbuXyL/pq6cnn0MCRkBfmeUSw=";
};
sourceRoot = "${src.name}/packages/grpc-google-iam-v1";
build-system = [ setuptools ];
dependencies = [
grpcio
googleapis-common-protos
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [
"google.iam"
"google.iam.v1"
];
pytestFlags = [
"-Wignore::DeprecationWarning"
];
meta = with lib; {
description = "GRPC library for the google-iam-v1 service";
homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/grpc-google-iam-v1";
changelog = "https://github.com/googleapis/google-cloud-python/blob/${src.tag}/packages/grpc-google-iam-v1/CHANGELOG.md";
license = licenses.asl20;
maintainers = [ ];
};
}