about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorIlya Kolpakov <ilya.kolpakov@gmail.com>2017-11-30 13:48:46 +0100
committerIlya Kolpakov <ilya.kolpakov@gmail.com>2017-11-30 13:48:46 +0100
commite15c715daf4c59894cc0b35190dbc0918a187c4b (patch)
tree4c462e93166ac3876a565b6ba78eafb28de8034e /pkgs
parent741d9c8c2d55ce812f8daf07c705804c937ee5c2 (diff)
downloadnixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.tar
nixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.tar.gz
nixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.tar.bz2
nixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.tar.lz
nixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.tar.xz
nixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.tar.zst
nixlib-e15c715daf4c59894cc0b35190dbc0918a187c4b.zip
pythonPackages.quandl: init at 3.2.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/quandl/allow-requests-v2.18.patch12
-rw-r--r--pkgs/development/python-modules/quandl/default.nix61
-rw-r--r--pkgs/top-level/python-packages.nix1
3 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/quandl/allow-requests-v2.18.patch b/pkgs/development/python-modules/quandl/allow-requests-v2.18.patch
new file mode 100644
index 000000000000..c4d14319a8b6
--- /dev/null
+++ b/pkgs/development/python-modules/quandl/allow-requests-v2.18.patch
@@ -0,0 +1,12 @@
+diff --git a/setup.py b/setup.py
+--- a/setup.py
++++ b/setup.py
+@@ -18,7 +18,7 @@ from version import VERSION  # NOQA
+ install_requires = [
+     'pandas >= 0.14',
+     'numpy >= 1.8',
+-    'requests >= 2.7.0, < 2.18',  # Version 2.18 appears to break pulling data.
++    'requests >= 2.7.0', # Works fine
+     'inflection >= 0.3.1',
+     'python-dateutil',
+     'six',
diff --git a/pkgs/development/python-modules/quandl/default.nix b/pkgs/development/python-modules/quandl/default.nix
new file mode 100644
index 000000000000..0184d25e31b0
--- /dev/null
+++ b/pkgs/development/python-modules/quandl/default.nix
@@ -0,0 +1,61 @@
+{
+  lib, fetchFromGitHub, buildPythonPackage, isPy3k,
+  # runtime dependencies
+  pandas, numpy, requests, inflection, python-dateutil, six, more-itertools,
+  # test suite dependencies
+  nose, unittest2, flake8, httpretty, mock, factory_boy, jsondate,
+  # additional runtime dependencies are required on Python 2.x
+  pyOpenSSL ? null, ndg-httpsclient ? null, pyasn1 ? null
+}:
+
+let
+  version = "3.2.1";
+  sha256 = "0vc0pzs2px9yaqkqcmd2m1b2bq1iils8fs0xbl0989hjq791a4jr";
+
+in buildPythonPackage rec {
+  pname = "quandl";
+  inherit version;
+
+  patches = [ ./allow-requests-v2.18.patch ];
+
+  src = fetchFromGitHub {
+    owner = "quandl";
+    repo = "quandl-python";
+    rev = "refs/tags/v${version}";
+    inherit sha256;
+    fetchSubmodules = true; # Fetching by tag does not work otherwise
+  };
+
+  doCheck = true;
+
+  checkInputs = [
+    nose
+    unittest2
+    flake8
+    httpretty
+    mock
+    factory_boy
+    jsondate
+  ];
+
+  propagatedBuildInputs = [
+    pandas
+    numpy
+    requests
+    inflection
+    python-dateutil
+    six
+    more-itertools
+  ] ++ lib.optional (!isPy3k) [
+    pyOpenSSL
+    ndg-httpsclient
+    pyasn1
+  ];
+
+  meta = {
+    homepage = "https://github.com/quandl/quandl-python";
+    description = "Quandl Python client library";
+    maintainers = [ lib.maintainers.ilya-kolpakov ];
+    license = lib.licenses.mit;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 0df99e762b3e..6c5c5ffbc465 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -24440,6 +24440,7 @@ EOF
 
   inflection = callPackage ../development/python-modules/inflection { };
 
+  quandl = callPackage ../development/python-modules/quandl { };
 });
 
 in fix' (extends overrides packages)