summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-04-09 16:46:57 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2023-04-09 17:01:28 +0200
commitfe16229c5ac9318c4147b332ae7ca51f6596d133 (patch)
treee57c986e2f944b17ef98922b35c357ece8704778
parent6c6fd0c269eb962d80052e79a92c06916feda168 (diff)
downloadnixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.tar
nixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.tar.gz
nixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.tar.bz2
nixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.tar.lz
nixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.tar.xz
nixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.tar.zst
nixpkgs-fe16229c5ac9318c4147b332ae7ca51f6596d133.zip
python311Packages.cassandra-driver: 3.25.0 -> 3.26.0
Diff: https://github.com/datastax/python-driver/compare/refs/tags/3.25.0...3.26.0

Changelog: https://github.com/datastax/python-driver/blob/3.26.0/CHANGELOG.rst
-rw-r--r--pkgs/development/python-modules/cassandra-driver/default.nix79
1 files changed, 48 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix
index 5c81846fe42..9b8d0fcd5ff 100644
--- a/pkgs/development/python-modules/cassandra-driver/default.nix
+++ b/pkgs/development/python-modules/cassandra-driver/default.nix
@@ -1,62 +1,58 @@
-{ stdenv
-, lib
+{ lib
+, stdenv
 , buildPythonPackage
-, fetchFromGitHub
-, pythonOlder
 , cython
 , eventlet
-, futures ? null
-, iana-etc
+, fetchFromGitHub
 , geomet
+, gevent
+, gremlinpython
+, iana-etc
 , libev
+, libredirect
 , mock
 , nose
 , pytestCheckHook
+, pythonOlder
 , pytz
 , pyyaml
 , scales
 , six
 , sure
-, gremlinpython
-, gevent
 , twisted
-, libredirect
 }:
 
 buildPythonPackage rec {
   pname = "cassandra-driver";
-  version = "3.25.0";
+  version = "3.26.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
-  # pypi tarball doesn't include tests
   src = fetchFromGitHub {
     owner = "datastax";
     repo = "python-driver";
-    rev = version;
-    sha256 = "1dn7iiavsrhh6i9hcyw0mk8j95r5ym0gbrvdca998hx2rnz5ark6";
+    rev = "refs/tags/${version}";
+    hash = "sha256-mLQEG41WyFtXY2PJzoM4uaI4Cm+0xSIAPGhijHHbTBk=";
   };
 
   postPatch = ''
-    substituteInPlace setup.py --replace 'geomet>=0.1,<0.3' 'geomet'
+    substituteInPlace setup.py \
+      --replace 'geomet>=0.1,<0.3' 'geomet'
   '';
 
-  nativeBuildInputs = [ cython ];
-  buildInputs = [ libev ];
-  propagatedBuildInputs = [ six geomet ]
-    ++ lib.optionals (pythonOlder "3.4") [ futures ];
+  nativeBuildInputs = [
+    cython
+  ];
 
-  # Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox,
-  # also /etc/resolv.conf is referenced by some tests
-  preCheck = (lib.optionalString stdenv.isLinux ''
-    echo "nameserver 127.0.0.1" > resolv.conf
-    export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
-    export LD_PRELOAD=${libredirect}/lib/libredirect.so
-  '') + ''
-    # increase tolerance for time-based test
-    substituteInPlace tests/unit/io/utils.py --replace 'delta=.15' 'delta=.3'
-  '';
-  postCheck = ''
-    unset NIX_REDIRECTS LD_PRELOAD
-  '';
+  buildInputs = [
+    libev
+  ];
+
+  propagatedBuildInputs = [
+    six
+    geomet
+  ];
 
   nativeCheckInputs = [
     pytestCheckHook
@@ -72,13 +68,34 @@ buildPythonPackage rec {
     twisted
   ];
 
+  # Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox,
+  # also /etc/resolv.conf is referenced by some tests
+  preCheck = (lib.optionalString stdenv.isLinux ''
+    echo "nameserver 127.0.0.1" > resolv.conf
+    export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
+    export LD_PRELOAD=${libredirect}/lib/libredirect.so
+  '') + ''
+    # increase tolerance for time-based test
+    substituteInPlace tests/unit/io/utils.py --replace 'delta=.15' 'delta=.3'
+  '';
+
+  pythonImportsCheck = [
+    "cassandra"
+  ];
+
+  postCheck = ''
+    unset NIX_REDIRECTS LD_PRELOAD
+  '';
+
   pytestFlagsArray = [
     "tests/unit"
   ];
+
   disabledTestPaths = [
     # requires puresasl
     "tests/unit/advanced/test_auth.py"
   ];
+
   disabledTests = [
     # doesn't seem to be intended to be run directly
     "_PoolTests"