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