python3Packages.cassandra-driver: unbreak for Python >= 3.13 (#451416)

This commit is contained in:
Robert Scott
2025-10-12 23:32:36 +01:00
committed by GitHub

View File

@@ -6,6 +6,7 @@
cython, cython,
eventlet, eventlet,
fetchFromGitHub, fetchFromGitHub,
fetchpatch,
geomet, geomet,
gevent, gevent,
gremlinpython, gremlinpython,
@@ -21,7 +22,6 @@
twisted, twisted,
setuptools, setuptools,
distutils, distutils,
pythonAtLeast,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@@ -36,6 +36,15 @@ buildPythonPackage rec {
hash = "sha256-RX9GLk2admzRasmP7LCwIfsJIt8TC/9rWhIcoTqS0qc="; hash = "sha256-RX9GLk2admzRasmP7LCwIfsJIt8TC/9rWhIcoTqS0qc=";
}; };
patches = [
# https://github.com/datastax/python-driver/pull/1242
(fetchpatch {
name = "Maintain-compatibility-with-CPython-3.13.patch";
url = "https://github.com/datastax/python-driver/commit/b144a84a1f97002c4545b335efaac719519cd9fa.patch";
hash = "sha256-60ki6i1SiGxK+J4x/8voS7Hh2x249ykpjU9EMYKD8kc=";
})
];
pythonRelaxDeps = [ "geomet" ]; pythonRelaxDeps = [ "geomet" ];
build-system = [ build-system = [
@@ -62,6 +71,10 @@ buildPythonPackage rec {
# This is used to determine the version of cython that can be used # This is used to determine the version of cython that can be used
CASS_DRIVER_ALLOWED_CYTHON_VERSION = cython.version; CASS_DRIVER_ALLOWED_CYTHON_VERSION = cython.version;
preBuild = ''
export CASS_DRIVER_BUILD_CONCURRENCY=$NIX_BUILD_CORES
'';
# Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox, # Make /etc/protocols accessible to allow socket.getprotobyname('tcp') in sandbox,
# also /etc/resolv.conf is referenced by some tests # also /etc/resolv.conf is referenced by some tests
preCheck = preCheck =
@@ -116,8 +129,6 @@ buildPythonPackage rec {
}; };
meta = { meta = {
# cassandra/io/libevwrapper.c:668:10: error: implicit declaration of function PyEval_ThreadsInitialized []
broken = pythonAtLeast "3.13";
description = "Python client driver for Apache Cassandra"; description = "Python client driver for Apache Cassandra";
homepage = "http://datastax.github.io/python-driver"; homepage = "http://datastax.github.io/python-driver";
changelog = "https://github.com/datastax/python-driver/blob/${version}/CHANGELOG.rst"; changelog = "https://github.com/datastax/python-driver/blob/${version}/CHANGELOG.rst";