[Buildroot] [git commit] package/python3: backport upstream patch to fix pyatomic.h headers

Julien Olivain ju.o at free.fr
Thu Apr 3 19:14:42 UTC 2025


commit: https://git.buildroot.net/buildroot/commit/?id=06803b1eb6f32a9ece4838853c5fe0effd7cb7b9
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Since the bump of Python to 3.13.2, cracklib fails to build when
Python support is enabled, due to an issue in the Python headers. This
issue has been fixed upstream in the 3.13.x branch, and this commit
simply backports the upstream fix.

Fixes:

  https://autobuild.buildroot.org/results/26f6fe75f75c65bb9d58bbdbec733ebfe9b8565c/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Signed-off-by: Julien Olivain <ju.o at free.fr>
---
 ...296-Fix-pyatomic.h-include-paths-GH-12932.patch | 63 ++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/package/python3/0010-3.13-gh-129296-Fix-pyatomic.h-include-paths-GH-12932.patch b/package/python3/0010-3.13-gh-129296-Fix-pyatomic.h-include-paths-GH-12932.patch
new file mode 100644
index 0000000000..00451af9bf
--- /dev/null
+++ b/package/python3/0010-3.13-gh-129296-Fix-pyatomic.h-include-paths-GH-12932.patch
@@ -0,0 +1,63 @@
+From 0ee012224447b6ec7f6f20d316b24449fdcc0d4b Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington at users.noreply.github.com>
+Date: Fri, 28 Feb 2025 09:22:15 +0100
+Subject: [PATCH] [3.13] gh-129296: Fix `pyatomic.h` include paths (GH-129320)
+ (#130667)
+
+gh-129296: Fix `pyatomic.h` include paths (GH-129320)
+
+Use relative includes in Include/cpython/pyatomic.h for
+pyatomic_gcc.h, pyatomic_std.h and pyatomic_msc.h.
+
+Do a similar change in Include/cpython/pythread.h for
+pthread_stubs.h include.
+(cherry picked from commit 3a974e39d54902699f360bc4db2fd351a6baf3ef)
+
+Co-authored-by: Zanie Blue <contact at zanie.dev>
+Upstream: 125ca028664ce72556e3983b57f521a118c4e677
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
+---
+ Include/cpython/pyatomic.h | 6 +++---
+ Include/cpython/pythread.h | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Include/cpython/pyatomic.h b/Include/cpython/pyatomic.h
+index 4ecef4f56ed..28029859d3d 100644
+--- a/Include/cpython/pyatomic.h
++++ b/Include/cpython/pyatomic.h
+@@ -529,15 +529,15 @@ static inline void _Py_atomic_fence_release(void);
+ 
+ #if _Py_USE_GCC_BUILTIN_ATOMICS
+ #  define Py_ATOMIC_GCC_H
+-#  include "cpython/pyatomic_gcc.h"
++#  include "pyatomic_gcc.h"
+ #  undef Py_ATOMIC_GCC_H
+ #elif __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
+ #  define Py_ATOMIC_STD_H
+-#  include "cpython/pyatomic_std.h"
++#  include "pyatomic_std.h"
+ #  undef Py_ATOMIC_STD_H
+ #elif defined(_MSC_VER)
+ #  define Py_ATOMIC_MSC_H
+-#  include "cpython/pyatomic_msc.h"
++#  include "pyatomic_msc.h"
+ #  undef Py_ATOMIC_MSC_H
+ #else
+ #  error "no available pyatomic implementation for this platform/compiler"
+diff --git a/Include/cpython/pythread.h b/Include/cpython/pythread.h
+index 03f710a9f7e..e658b35bd90 100644
+--- a/Include/cpython/pythread.h
++++ b/Include/cpython/pythread.h
+@@ -22,7 +22,7 @@ PyAPI_DATA(const long long) PY_TIMEOUT_MAX;
+     */
+ #   define NATIVE_TSS_KEY_T     unsigned long
+ #elif defined(HAVE_PTHREAD_STUBS)
+-#   include "cpython/pthread_stubs.h"
++#   include "pthread_stubs.h"
+ #   define NATIVE_TSS_KEY_T     pthread_key_t
+ #else
+ #   error "Require native threads. See https://bugs.python.org/issue31370"
+-- 
+2.48.1
+


More information about the buildroot mailing list