Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / quandl / default.nix
blobb378392f7a974036d9f47f744bf7d500439b6ea6
1 { lib, fetchPypi, buildPythonPackage, isPy3k, pythonOlder
2 # runtime dependencies
3 , pandas, numpy, requests, inflection, python-dateutil, six, more-itertools, importlib-metadata
4 # test suite dependencies
5 , nose, unittest2, flake8, httpretty, mock, jsondate, parameterized, faker, factory_boy
6 # additional runtime dependencies are required on Python 2.x
7 , pyopenssl, ndg-httpsclient, pyasn1
8 }:
10 buildPythonPackage rec {
11   pname = "quandl";
12   version = "3.6.1";
13   disabled = !isPy3k;
15   src = fetchPypi {
16     inherit version;
17     pname = "Quandl";
18     sha256 = "0jr69fqxhzdmkfh3fxz0yp2kks2hkmixrscjjf59q2l7irglwhc4";
19   };
21   checkInputs = [
22     nose
23     unittest2
24     flake8
25     httpretty
26     mock
27     jsondate
28     parameterized
29     faker
30     factory_boy
31   ];
33   propagatedBuildInputs = [
34     pandas
35     numpy
36     requests
37     inflection
38     python-dateutil
39     six
40     more-itertools
41   ] ++ lib.optionals (!isPy3k) [
42     pyopenssl
43     ndg-httpsclient
44     pyasn1
45   ] ++ lib.optionals (pythonOlder "3.8") [
46     importlib-metadata
47   ];
49   pythonImportsCheck = [ "quandl" ];
51   meta = with lib; {
52     description = "Quandl Python client library";
53     homepage = "https://github.com/quandl/quandl-python";
54     changelog = "https://github.com/quandl/quandl-python/blob/master/CHANGELOG.md";
55     license = licenses.mit;
56     maintainers = with maintainers; [ ilya-kolpakov ];
57   };