about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cassandra-driver/default.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-11-09 06:01:40 +0000
committerGitHub <noreply@github.com>2023-11-09 06:01:40 +0000
commitfecd99b105c644b1b61abfec6c203b304269e1e2 (patch)
treeba0cde17b0de008691f339cdae1c4d19369a729c /pkgs/development/python-modules/cassandra-driver/default.nix
parent50249cdaf29f872fb960dc9110696d208a77fc3a (diff)
parent4aad65bfdbc56be726873b09b4bbaa88448ecbba (diff)
downloadnixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.gz
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.bz2
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.lz
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.xz
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.tar.zst
nixlib-fecd99b105c644b1b61abfec6c203b304269e1e2.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules/cassandra-driver/default.nix')
-rw-r--r--pkgs/development/python-modules/cassandra-driver/default.nix28
1 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix
index 5d6c520ad3c1..e985ed544d3c 100644
--- a/pkgs/development/python-modules/cassandra-driver/default.nix
+++ b/pkgs/development/python-modules/cassandra-driver/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , buildPythonPackage
+, cryptography
 , cython
 , eventlet
 , fetchFromGitHub
@@ -24,7 +25,7 @@
 
 buildPythonPackage rec {
   pname = "cassandra-driver";
-  version = "3.26.0";
+  version = "3.28.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -33,7 +34,7 @@ buildPythonPackage rec {
     owner = "datastax";
     repo = "python-driver";
     rev = "refs/tags/${version}";
-    hash = "sha256-mLQEG41WyFtXY2PJzoM4uaI4Cm+0xSIAPGhijHHbTBk=";
+    hash = "sha256-5JRbzYl7ftgK6GuvXWdvo52ZlS1th9JyLAYu/UCcPVc=";
   };
 
   postPatch = ''
@@ -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
@@ -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 = [
@@ -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";