2018-10-15 18:51:43 +02:00
|
|
|
{ stdenv
|
2019-02-21 08:02:10 +01:00
|
|
|
, libev
|
2018-10-15 18:51:43 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pkgs
|
|
|
|
, cython
|
|
|
|
, futures
|
|
|
|
, six
|
|
|
|
, python
|
|
|
|
, scales
|
|
|
|
, eventlet
|
|
|
|
, twisted
|
|
|
|
, mock
|
|
|
|
, gevent
|
|
|
|
, nose
|
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
, sure
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cassandra-driver";
|
2019-03-27 15:46:02 +01:00
|
|
|
version = "3.17.0";
|
2018-10-15 18:51:43 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-03-27 15:46:02 +01:00
|
|
|
sha256 = "1z49z6f9rj9kp1v03s1hs1rg8cj49rh0yk0fc2qi57w7slgy2hkd";
|
2018-10-15 18:51:43 +02:00
|
|
|
};
|
|
|
|
|
2019-02-13 10:29:56 +01:00
|
|
|
buildInputs = [
|
2019-02-21 08:02:10 +01:00
|
|
|
libev
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2019-02-13 10:29:56 +01:00
|
|
|
# NOTE: next version will work with cython 0.29
|
|
|
|
# Requires 'Cython!=0.25,<0.29,>=0.20'
|
|
|
|
(cython.overridePythonAttrs(old: rec {
|
|
|
|
pname = "Cython";
|
|
|
|
version = "0.28.3";
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526";
|
|
|
|
};
|
|
|
|
}))
|
|
|
|
];
|
2018-10-15 18:51:43 +02:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ six ]
|
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.4") [ futures ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s/<=1.0.1//" setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} setup.py gevent_nosetests
|
|
|
|
${python.interpreter} setup.py eventlet_nosetests
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ scales eventlet twisted mock gevent nose pytz pyyaml sure ];
|
|
|
|
|
|
|
|
# Could not get tests running
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://datastax.github.io/python-driver/;
|
|
|
|
description = "A Python client driver for Apache Cassandra";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|