2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2023-03-24 00:07:29 +00:00
|
|
|
, appdirs
|
2020-04-24 23:36:52 +00:00
|
|
|
, babelfish
|
|
|
|
, beautifulsoup4
|
2023-03-24 00:07:29 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, chardet
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
2021-12-06 16:07:01 +00:00
|
|
|
, dogpile-cache
|
2023-03-24 00:07:29 +00:00
|
|
|
, enzyme
|
|
|
|
, fetchFromGitHub
|
|
|
|
, guessit
|
2020-04-24 23:36:52 +00:00
|
|
|
, pysrt
|
2023-03-24 00:07:29 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
2023-03-24 00:07:29 +00:00
|
|
|
, rarfile
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, stevedore
|
2020-04-24 23:36:52 +00:00
|
|
|
, sympy
|
|
|
|
, vcrpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "subliminal";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "2.1.0";
|
2023-03-24 00:07:29 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Diaoul";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-P4gVxKKCGKS3MC4F3yTAaOSv36TtdoYfrf61tBHg8VY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace " --pep8 --flakes" ""
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-24 00:07:29 +00:00
|
|
|
appdirs
|
|
|
|
babelfish
|
|
|
|
beautifulsoup4
|
|
|
|
chardet
|
|
|
|
click
|
|
|
|
dogpile-cache
|
|
|
|
enzyme
|
|
|
|
guessit
|
|
|
|
pysrt
|
|
|
|
pytz
|
|
|
|
rarfile
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
stevedore
|
2021-06-06 07:54:09 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-24 00:07:29 +00:00
|
|
|
sympy
|
|
|
|
vcrpy
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"subliminal"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests rewuire network access
|
|
|
|
"test_refine_video_metadata"
|
|
|
|
"test_scan"
|
|
|
|
"test_hash"
|
|
|
|
"test_provider_pool_list_subtitles"
|
|
|
|
"test_async_provider_pool_list_subtitles"
|
|
|
|
"test_list_subtitles"
|
|
|
|
"test_download_bad_subtitle"
|
|
|
|
# Not implemented
|
|
|
|
"test_save_subtitles"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# AttributeError: module 'rarfile' has no attribute 'custom_check'
|
|
|
|
"tests/test_legendastv.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to search and download subtitles";
|
2023-03-24 00:07:29 +00:00
|
|
|
homepage = "https://github.com/Diaoul/subliminal";
|
|
|
|
changelog = "https://github.com/Diaoul/subliminal/blob/${version}/HISTORY.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-03-24 00:07:29 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|