2018-10-15 16:51:43 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pkgs
|
|
|
|
, cython
|
|
|
|
, futures
|
|
|
|
, six
|
|
|
|
, python
|
|
|
|
, scales
|
|
|
|
, eventlet
|
|
|
|
, twisted
|
|
|
|
, mock
|
|
|
|
, gevent
|
|
|
|
, nose
|
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
, sure
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cassandra-driver";
|
2018-10-30 16:07:48 +00:00
|
|
|
version = "3.15.1";
|
2018-10-15 16:51:43 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-30 16:07:48 +00:00
|
|
|
sha256 = "1xcirbvlj00id8269akhk8gy2sv0mlnbgy3nagi32648jwsrcadg";
|
2018-10-15 16:51:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ pkgs.libev cython ];
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|