mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
This enables the Python, SMART, and lm-sensors plugins for collectd. * gnu/packages/patches/collectd-5.11.0-python-3.11.patch: New file. * gnu/local.mk (dist_patch_DATA): Add collectd-5.11.0-python-3.11.patch. * gnu/packages/monitoring.scm (patches): Add collectd-5.11.0-python-3.11.patch. (arguments): Add --enable-python. (native-inputs): Add python-3. (arguments): Add --enable-smart. (native-inputs): Add libatasmart. (arguments): Add --enable-sensors. (native-inputs): Add lm-sensors. Change-Id: I40e059c7883ac29b74572b2c05e638d6fc47bc16
30 lines
881 B
Diff
30 lines
881 B
Diff
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.
|
|
|
|
diff --git a/src/cpython.h b/src/cpython.h
|
|
index 11e64fa6..bcfa406f 100644
|
|
--- a/src/cpython.h
|
|
+++ b/src/cpython.h
|
|
@@ -24,9 +24,15 @@
|
|
* 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
|