26 buildPythonPackage rec {
27 pname = "cassandra-driver";
30 # pypi tarball doesn't include tests
31 src = fetchFromGitHub {
33 repo = "python-driver";
35 sha256 = "1dn7iiavsrhh6i9hcyw0mk8j95r5ym0gbrvdca998hx2rnz5ark6";
39 substituteInPlace setup.py --replace 'geomet>=0.1,<0.3' 'geomet'
42 nativeBuildInputs = [ cython ];
43 buildInputs = [ libev ];
44 propagatedBuildInputs = [ six geomet ]
45 ++ lib.optionals (pythonOlder "3.4") [ futures ];
47 # Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox,
48 # also /etc/resolv.conf is referenced by some tests
49 preCheck = (lib.optionalString stdenv.isLinux ''
50 echo "nameserver 127.0.0.1" > resolv.conf
51 export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
52 export LD_PRELOAD=${libredirect}/lib/libredirect.so
54 # increase tolerance for time-based test
55 substituteInPlace tests/unit/io/utils.py --replace 'delta=.15' 'delta=.3'
58 unset NIX_REDIRECTS LD_PRELOAD
80 "tests/unit/advanced/test_auth.py"
83 # doesn't seem to be intended to be run directly
85 # attempts to make connection to localhost
86 "test_connection_initialization"
88 "test_nts_token_performance"
92 description = "A Python client driver for Apache Cassandra";
93 homepage = "http://datastax.github.io/python-driver";
94 license = licenses.asl20;
95 maintainers = with maintainers; [ turion ris ];