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,
buildPythonPackage,
fetchPypi,
python-dateutil,
babelfish,
rebulk,
pythonOlder,
importlib-resources,
py,
pytestCheckHook,
pytest-mock,
pytest-benchmark,
pyyaml,
}:
buildPythonPackage rec {
pname = "guessit";
version = "3.8.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-Zhn8u/mgUQ7IwsM3RMQlHK0FB7HVc9Bch13hftxe2+0=";
};
propagatedBuildInputs = [
rebulk
babelfish
python-dateutil
] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
nativeCheckInputs = [
py
pytestCheckHook
pytest-mock
pytest-benchmark
pyyaml
];
pytestFlags = [ "--benchmark-disable" ];
pythonImportsCheck = [ "guessit" ];
meta = with lib; {
description = "Python library that extracts as much information as possible from a video filename";
mainProgram = "guessit";
homepage = "https://guessit-io.github.io/guessit/";
changelog = "https://github.com/guessit-io/guessit/raw/v${version}/CHANGELOG.md";
license = licenses.lgpl3Only;
maintainers = [ ];
};
}