1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 beautifulsoup4, 7 datetime, 8 lxml, 9 pandas, 10 pytest-mock, 11 pytestCheckHook, 12 requests, 13}: 14 15buildPythonPackage rec { 16 pname = "finvizfinance"; 17 version = "0.14.7"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.5"; 21 22 src = fetchFromGitHub { 23 owner = "lit26"; 24 repo = "finvizfinance"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-ht1bez04MAgugsQqa47q2ED7z8xpiXmzkOYBR7/PZHU="; 27 }; 28 29 postPatch = '' 30 substituteInPlace setup.py \ 31 --replace "bs4" "beautifulsoup4" 32 ''; 33 34 nativeCheckInputs = [ 35 pytest-mock 36 pytestCheckHook 37 ]; 38 39 propagatedBuildInputs = [ 40 beautifulsoup4 41 datetime 42 lxml 43 pandas 44 requests 45 ]; 46 47 pythonImportsCheck = [ "finvizfinance" ]; 48 49 disabledTests = [ 50 # Tests require network access 51 "test_finvizfinance_calendar" 52 "test_finvizfinance_crypto" 53 "test_forex_performance_percentage" 54 "test_group_overview" 55 "test_finvizfinance_insider" 56 "test_finvizfinance_news" 57 "test_finvizfinance_finvizfinance" 58 "test_statements" 59 "test_screener_overview" 60 ]; 61 62 meta = with lib; { 63 description = "Finviz Finance information downloader"; 64 homepage = "https://github.com/lit26/finvizfinance"; 65 changelog = "https://github.com/lit26/finvizfinance/releases/tag/v${version}"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ icyrockcom ]; 68 }; 69}