1{
2 lib, fetchPypi, buildPythonPackage, isPy3k, pythonOlder,
3 # runtime dependencies
4 pandas, numpy, requests, inflection, python-dateutil, six, more-itertools, importlib-metadata,
5 # test suite dependencies
6 nose, unittest2, flake8, httpretty, mock, jsondate, parameterized, faker, factory_boy,
7 # additional runtime dependencies are required on Python 2.x
8 pyOpenSSL ? null, ndg-httpsclient ? null, pyasn1 ? null
9}:
10
11buildPythonPackage rec {
12 pname = "quandl";
13 version = "3.5.0";
14 disabled = !isPy3k;
15
16 src = fetchPypi {
17 inherit version;
18 pname = "Quandl";
19 sha256 = "0zpw0nwqr4g56l9z4my0fahfgpcmfx74acbmv6nfx1dmq5ggraf3";
20 };
21
22 doCheck = true;
23
24 checkInputs = [
25 nose
26 unittest2
27 flake8
28 httpretty
29 mock
30 jsondate
31 parameterized
32 faker
33 factory_boy
34 ];
35
36 propagatedBuildInputs = [
37 pandas
38 numpy
39 requests
40 inflection
41 python-dateutil
42 six
43 more-itertools
44 ] ++ lib.optionals (!isPy3k) [
45 pyOpenSSL
46 ndg-httpsclient
47 pyasn1
48 ] ++ lib.optionals (pythonOlder "3.8") [
49 importlib-metadata
50 ];
51
52 meta = with lib; {
53 description = "Quandl Python client library";
54 homepage = "https://github.com/quandl/quandl-python";
55 license = licenses.mit;
56 maintainers = with maintainers; [ ilya-kolpakov ];
57 };
58}