Files
nixpkgs/pkgs/development/python-modules/pyspcwebgw/default.nix
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

53 lines
1.0 KiB
Nix

{
lib,
aiohttp,
aioresponses,
asynccmd,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pyspcwebgw";
version = "0.7.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "mbrrg";
repo = "pyspcwebgw";
tag = "v${version}";
hash = "sha256-gdIrbr25GXaX26B1f7u0NKbqqnAC2tmMFZspzW6I4HI=";
};
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
asynccmd
aiohttp
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
];
pytestFlags = [ "--asyncio-mode=auto" ];
pythonImportsCheck = [ "pyspcwebgw" ];
meta = with lib; {
description = "Python module for the SPC Web Gateway REST API";
homepage = "https://github.com/mbrrg/pyspcwebgw";
changelog = "https://github.com/pyspcwebgw/pyspcwebgw/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}