Merge pull request #32202 from ilya-kolpakov/python-quandl

pythonPackages.quandl: 3.0.0 -> 3.2.1
This commit is contained in:
Joachim F
2017-12-14 16:49:19 +00:00
committed by GitHub
6 changed files with 124 additions and 47 deletions

View File

@@ -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;
};
}

View File

@@ -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;
};
}

View File

@@ -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',

View File

@@ -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;
};
}