2019-10-01 01:49:44 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi, python, pythonOlder
|
2018-10-15 17:51:43 +01:00
|
|
|
, cython
|
|
|
|
, eventlet
|
2019-10-01 01:49:44 +01:00
|
|
|
, futures
|
|
|
|
, libev
|
2018-10-15 17:51:43 +01:00
|
|
|
, mock
|
|
|
|
, nose
|
2019-10-01 01:49:44 +01:00
|
|
|
, pytest
|
2018-10-15 17:51:43 +01:00
|
|
|
, pytz
|
|
|
|
, pyyaml
|
2019-10-01 01:49:44 +01:00
|
|
|
, scales
|
|
|
|
, six
|
2018-10-15 17:51:43 +01:00
|
|
|
, sure
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cassandra-driver";
|
2019-12-09 04:27:05 +00:00
|
|
|
version = "3.20.2";
|
2018-10-15 17:51:43 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-09 04:27:05 +00:00
|
|
|
sha256 = "03nycyn5nd1pnrg6fffq3wcjqnw13lgja137zq5zszx68mc15wnl";
|
2018-10-15 17:51:43 +01:00
|
|
|
};
|
|
|
|
|
2019-10-01 01:49:44 +01:00
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
buildInputs = [ libev ];
|
2018-10-15 17:51:43 +01:00
|
|
|
propagatedBuildInputs = [ six ]
|
2019-10-01 01:49:44 +01:00
|
|
|
++ lib.optionals (pythonOlder "3.4") [ futures ];
|
2018-10-15 17:51:43 +01:00
|
|
|
|
2019-10-01 01:49:44 +01:00
|
|
|
checkInputs = [ eventlet mock nose pytest pytz pyyaml sure ];
|
2018-10-15 17:51:43 +01:00
|
|
|
|
2019-10-01 01:49:44 +01:00
|
|
|
# ignore test files which try to do socket.getprotocolname('tcp')
|
|
|
|
# as it fails in sandbox mode due to lack of a /etc/protocols file
|
2018-10-15 17:51:43 +01:00
|
|
|
checkPhase = ''
|
2019-10-01 01:49:44 +01:00
|
|
|
pytest tests/unit \
|
|
|
|
--ignore=tests/unit/io/test_libevreactor.py \
|
|
|
|
--ignore=tests/unit/io/test_eventletreactor.py \
|
|
|
|
--ignore=tests/unit/io/test_asyncorereactor.py
|
2018-10-15 17:51:43 +01:00
|
|
|
'';
|
|
|
|
|
2019-10-01 01:49:44 +01:00
|
|
|
meta = with lib; {
|
2018-10-15 17:51:43 +01:00
|
|
|
description = "A Python client driver for Apache Cassandra";
|
2019-10-01 01:49:44 +01:00
|
|
|
homepage = "http://datastax.github.io/python-driver";
|
2018-10-15 17:51:43 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|