Skip to content

Commit

Permalink
python3Packages.cassandra-driver: 3.26.0 -> 3.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
risicle committed Nov 8, 2023
1 parent e7704a1 commit 0981d53
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions pkgs/development/python-modules/cassandra-driver/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, buildPythonPackage
, cryptography
, cython
, eventlet
, fetchFromGitHub
Expand All @@ -24,7 +25,7 @@

buildPythonPackage rec {
pname = "cassandra-driver";
version = "3.26.0";
version = "3.28.0";
format = "setuptools";

disabled = pythonOlder "3.7";
Expand All @@ -33,7 +34,7 @@ buildPythonPackage rec {
owner = "datastax";
repo = "python-driver";
rev = "refs/tags/${version}";
hash = "sha256-mLQEG41WyFtXY2PJzoM4uaI4Cm+0xSIAPGhijHHbTBk=";
hash = "sha256-5JRbzYl7ftgK6GuvXWdvo52ZlS1th9JyLAYu/UCcPVc=";
};

postPatch = ''
Expand All @@ -56,17 +57,12 @@ buildPythonPackage rec {

nativeCheckInputs = [
pytestCheckHook
eventlet
mock
nose
pytz
pyyaml
sure
scales
gremlinpython
gevent
twisted
];
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);

# Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox,
# also /etc/resolv.conf is referenced by some tests
Expand All @@ -77,6 +73,13 @@ buildPythonPackage rec {
'') + ''
# increase tolerance for time-based test
substituteInPlace tests/unit/io/utils.py --replace 'delta=.15' 'delta=.3'
export HOME=$(mktemp -d)
# cythonize this before we hide the source dir as it references
# one of its files
cythonize -i tests/unit/cython/types_testhelper.pyx
mv cassandra .cassandra.hidden
'';

pythonImportsCheck = [
Expand Down Expand Up @@ -105,6 +108,15 @@ buildPythonPackage rec {
"test_nts_token_performance"
];

passthru.optional-dependencies = {
cle = [ cryptography ];
eventlet = [ eventlet ];
gevent = [ gevent ];
graph = [ gremlinpython ];
metrics = [ scales ];
twisted = [ twisted ];
};

meta = with lib; {
description = "A Python client driver for Apache Cassandra";
homepage = "http://datastax.github.io/python-driver";
Expand Down

0 comments on commit 0981d53

Please sign in to comment.