summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch
new file mode 100644
index 0000000000..c4262985ba
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch
@@ -0,0 +1,37 @@
1From eaeb95ec64762a58dde7cf368fc17188382e7df6 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Fri, 28 Mar 2025 12:13:26 +0800
4Subject: [PATCH] setup.py: Make the cmd available
5
6The cmd will be None in OE environment as below.
7 >>> import os
8 >>> os.environ.get('CC', 'gcc')
9'x86_64-wrs-linux-gcc -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/buildarea/tmp/work/corei7-64-wrs-linux/python3-m2crypto/0.44.0/recipe-sysroot'
10 >>> import shutil
11 >>> shutil.which(os.environ.get('CC', 'gcc'))
12 >>> cmd = [shutil.which(os.environ.get('CC', 'gcc'))]
13 >>> print(cmd)
14[None]
15
16So change the check logic to get the expected cmd.
17
18Upstream-Status: Inappropriate [oe specific]
19
20Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
21---
22 setup.py | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/setup.py b/setup.py
26index 9938e67..21e2346 100644
27--- a/setup.py
28+++ b/setup.py
29@@ -230,7 +230,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
30 with open(
31 "src/SWIG/x509_v_flag.h", "w", encoding="utf-8"
32 ) as x509_v_h:
33- cmd = [shutil.which(os.environ.get('CC', 'gcc'))]
34+ cmd = os.environ.get('CC', 'gcc').split()
35 cflags = os.environ.get("CFLAGS")
36 if cflags is not None:
37 cmd += cflags.split()