diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2017-12-14 16:49:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 16:49:19 +0000 |
commit | fbc452c836d1cd8f923621086eead2abfd2b1698 (patch) | |
tree | 22f247e6869c69dda057f0d4d26596ff4f353356 /pkgs/development/python-modules | |
parent | 98d1da90bd94cfd7f4e2cd0418a6955a1acec85f (diff) | |
parent | 5551af487ff9581bedf3079ac6ac5ce8245b8572 (diff) | |
download | nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.tar nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.tar.gz nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.tar.bz2 nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.tar.lz nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.tar.xz nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.tar.zst nixlib-fbc452c836d1cd8f923621086eead2abfd2b1698.zip |
Merge pull request #32202 from ilya-kolpakov/python-quandl
pythonPackages.quandl: 3.0.0 -> 3.2.1
Diffstat (limited to 'pkgs/development/python-modules')
4 files changed, 116 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/inflection/default.nix b/pkgs/development/python-modules/inflection/default.nix new file mode 100644 index 000000000000..bccf49c56adf --- /dev/null +++ b/pkgs/development/python-modules/inflection/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchPypi, buildPythonPackage, pytest } : + +buildPythonPackage rec { + pname = "inflection"; + version = "0.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"; + }; + + checkInputs = [ pytest ]; + # Suppress overly verbose output if tests run successfully + checkPhase = ''pytest >/dev/null || pytest''; + + meta = { + homepage = https://github.com/jpvanhal/inflection; + description = "A port of Ruby on Rails inflector to Python"; + maintainers = with lib.maintainers; [ NikolaMandic ilya-kolpakov ]; + license = lib.licenses.mit; + }; +} + diff --git a/pkgs/development/python-modules/jsondate/default.nix b/pkgs/development/python-modules/jsondate/default.nix new file mode 100644 index 000000000000..7888a6df23cc --- /dev/null +++ b/pkgs/development/python-modules/jsondate/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchFromGitHub, buildPythonPackage, six }: + +buildPythonPackage rec { + version = "0.1.3"; + pname = "jsondate"; + + src = fetchFromGitHub { + owner = "ilya-kolpakov"; + repo = "jsondate"; + rev = "refs/tags/v${version}"; + sha256 = "0nhvi48nc0bmad5ncyn6c9yc338krs3xf10bvv55xgz25c5gdgwy"; + fetchSubmodules = true; # Fetching by tag does not work otherwise + }; + + propagatedBuildInputs = [ six ]; + + meta = { + homepage = "https://github.com/ilya-kolpakov/jsondate"; + description = "JSON with datetime handling"; + license = lib.licenses.mit; + }; +} 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..e85e9c4e0f8c --- /dev/null +++ b/pkgs/development/python-modules/quandl/default.nix @@ -0,0 +1,59 @@ +{ + 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 +}: + +buildPythonPackage rec { + pname = "quandl"; + version = "3.2.1"; + sha256 = "0vc0pzs2px9yaqkqcmd2m1b2bq1iils8fs0xbl0989hjq791a4jr"; + + patches = [ ./allow-requests-v2.18.patch ]; + + # Tests do not work with fetchPypi + src = fetchFromGitHub { + owner = pname; + 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; + }; +} |