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-10-01 01:49:44 +01:00
|
|
|
version = "3.19.0";
|
2018-10-15 17:51:43 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-01 01:49:44 +01:00
|
|
|
sha256 = "1vy9yzsd9c29irq99m8lpkgnc634waai2phvr6b89pmmdirp2wm9";
|
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;
|
|
|
|
};
|
|
|
|
}
|