lol

python310Packages.subliminal: enable tests

- disable on unpoorted Python releases
- add changelog
- add format
- remove linting and coverage
- clean-up inputs

+66 -26
+66 -26
pkgs/development/python-modules/subliminal/default.nix
··· 1 1 { lib 2 - , fetchPypi 3 - , buildPythonPackage 4 - , guessit 2 + , appdirs 5 3 , babelfish 6 - , enzyme 7 4 , beautifulsoup4 8 - , requests 5 + , buildPythonPackage 6 + , chardet 9 7 , click 10 8 , dogpile-cache 11 - , stevedore 12 - , chardet 9 + , enzyme 10 + , fetchFromGitHub 11 + , guessit 13 12 , pysrt 13 + , pytestCheckHook 14 + , pythonOlder 15 + , pytz 16 + , rarfile 17 + , requests 14 18 , six 15 - , appdirs 16 - , rarfile 17 - , pytz 19 + , stevedore 18 20 , sympy 19 21 , vcrpy 20 - , pytest 21 - , pytest-flakes 22 - , pytest-cov 23 - , pytest-runner 24 22 }: 25 23 26 24 buildPythonPackage rec { 27 25 pname = "subliminal"; 28 26 version = "2.1.0"; 27 + format = "setuptools"; 29 28 30 - src = fetchPypi { 31 - inherit pname version; 32 - sha256 = "12v2clnbic8320fjsvkg3xfxfa7x8inhjk61z00pzwx46g3rqhy6"; 29 + disabled = pythonOlder "3.7"; 30 + 31 + src = fetchFromGitHub { 32 + owner = "Diaoul"; 33 + repo = pname; 34 + rev = "refs/tags/${version}"; 35 + hash = "sha256-P4gVxKKCGKS3MC4F3yTAaOSv36TtdoYfrf61tBHg8VY="; 33 36 }; 34 37 38 + postPatch = '' 39 + substituteInPlace pytest.ini \ 40 + --replace " --pep8 --flakes" "" 41 + ''; 42 + 35 43 propagatedBuildInputs = [ 36 - guessit babelfish enzyme beautifulsoup4 requests 37 - click dogpile-cache stevedore chardet pysrt six 38 - appdirs rarfile pytz 44 + appdirs 45 + babelfish 46 + beautifulsoup4 47 + chardet 48 + click 49 + dogpile-cache 50 + enzyme 51 + guessit 52 + pysrt 53 + pytz 54 + rarfile 55 + requests 56 + six 57 + stevedore 39 58 ]; 40 59 41 60 nativeCheckInputs = [ 42 - sympy vcrpy pytest pytest-flakes 43 - pytest-cov pytest-runner 61 + sympy 62 + vcrpy 63 + pytestCheckHook 44 64 ]; 45 65 46 - # https://github.com/Diaoul/subliminal/pull/963 47 - doCheck = false; 48 - pythonImportsCheck = [ "subliminal" ]; 66 + pythonImportsCheck = [ 67 + "subliminal" 68 + ]; 69 + 70 + disabledTests = [ 71 + # Tests rewuire network access 72 + "test_refine_video_metadata" 73 + "test_scan" 74 + "test_hash" 75 + "test_provider_pool_list_subtitles" 76 + "test_async_provider_pool_list_subtitles" 77 + "test_list_subtitles" 78 + "test_download_bad_subtitle" 79 + # Not implemented 80 + "test_save_subtitles" 81 + ]; 82 + 83 + disabledTestPaths = [ 84 + # AttributeError: module 'rarfile' has no attribute 'custom_check' 85 + "tests/test_legendastv.py" 86 + ]; 49 87 50 88 meta = with lib; { 89 + description = "Python library to search and download subtitles"; 51 90 homepage = "https://github.com/Diaoul/subliminal"; 52 - description = "Python library to search and download subtitles"; 91 + changelog = "https://github.com/Diaoul/subliminal/blob/${version}/HISTORY.rst"; 53 92 license = licenses.mit; 93 + maintainers = with maintainers; [ ]; 54 94 }; 55 95 }