python311_ftbfs_fix
authorCollectd Packaging Team <team+collectd@tracker.debian.org>
Mon, 20 Feb 2023 12:55:26 +0000 (12:55 +0000)
committerBernd Zeimetz <bzed@debian.org>
Mon, 20 Feb 2023 12:55:26 +0000 (12:55 +0000)
commit 623e95394e0e62e7f9ced2104b786d21e9c0bf53
Author: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date:   Wed Sep 21 22:21:58 2022 +0700

    cpython: fix build with Python 3.11

    Python 3.11 moves longintrepr.h into cpython sub-directory.
    However, in this version, longintrepr.h is always included.

Gbp-Pq: Name python311_ftbfs_fix.patch

src/cpython.h

index 11e64fa62f20850c450b8d1362d7f6a5c0a67037..bcfa406febfdf61f1f11dcd5535f2659f589abe8 100644 (file)
  *   Sven Trenkel <collectd at semidefinite.de>
  **/
 
+#include <Python.h>
 /* Some python versions don't include this by default. */
-
+#if PY_VERSION_HEX < 0x030B0000
+/*
+ * Python 3.11 move longintrepr.h to cpython/longintrepr.h
+ * And it's always included
+ */
 #include <longintrepr.h>
+#endif /* PY_VERSION_HEX < 0x030B0000 */
 
 /* These two macros are basically Py_BEGIN_ALLOW_THREADS and
  * Py_BEGIN_ALLOW_THREADS