1{ lib
2, buildPythonPackage
3, fetchPypi
4, python-dateutil
5, babelfish
6, rebulk
7, pythonOlder
8, importlib-resources
9, pytestCheckHook
10, pytest-mock
11, pytest-benchmark
12, pyyaml
13}:
14
15buildPythonPackage rec {
16 pname = "guessit";
17 version = "3.4.3";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "731e96e6a1f3b065d05accc8c19f35d4485d880b77ab8dc4b262cc353df294f7";
22 };
23
24 propagatedBuildInputs = [
25 rebulk
26 babelfish
27 python-dateutil
28 ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
29
30 checkInputs = [ pytestCheckHook pytest-mock pytest-benchmark pyyaml ];
31
32 pytestFlagsArray = [ "--benchmark-disable" ];
33
34 pythonImportsCheck = [ "guessit" ];
35
36 meta = {
37 homepage = "https://doc.guessit.io/";
38 description = "A Python library that extracts as much information as possible from a video filename";
39 changelog = "https://github.com/guessit-io/guessit/raw/v${version}/CHANGELOG.md";
40 license = lib.licenses.lgpl3Only;
41 };
42}