summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-11-02 18:02:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 10:12:42 +0000
commit851be8baed10f127f85c6c0edfd67a79a596d5f9 (patch)
tree994393ea7ded405398f4445ca390d87353a5e1cb /meta/recipes-devtools/python/python3
parent859776220f8b1cf1f4178b0fcfbff01f844a580a (diff)
downloadpoky-851be8baed10f127f85c6c0edfd67a79a596d5f9.tar.gz
python3: silence DeprecationWarnings in python3-config
Our patched python3-config uses distutils, but that will emit a DeprecationWarning when imported. This isn't useful when using the output of python3-config to find include paths. This isn't a huge problem typically as the warning goes to stderr, but some build systems read both stdout and stderr. (From OE-Core rev: e25b8f5af70a094307dc5c0a25f213ae9570f349) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/python-config.patch5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch
index d0ddbbc7fd..c53f646af3 100644
--- a/meta/recipes-devtools/python/python3/python-config.patch
+++ b/meta/recipes-devtools/python/python3/python-config.patch
@@ -14,7 +14,6 @@ as appropriate.
14Upstream-Status: Inappropriate [Embedded Specific] 14Upstream-Status: Inappropriate [Embedded Specific]
15 15
16Signed-off-by: Tyler Hall <tylerwhall@gmail.com> 16Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
17:
18 17
19--- 18---
20 Misc/python-config.in | 10 +++++----- 19 Misc/python-config.in | 10 +++++-----
@@ -24,11 +23,13 @@ diff --git a/Misc/python-config.in b/Misc/python-config.in
24index ebd99da..13e57ae 100644 23index ebd99da..13e57ae 100644
25--- a/Misc/python-config.in 24--- a/Misc/python-config.in
26+++ b/Misc/python-config.in 25+++ b/Misc/python-config.in
27@@ -6,7 +6,7 @@ 26@@ -6,7 +6,9 @@
28 import getopt 27 import getopt
29 import os 28 import os
30 import sys 29 import sys
31-import sysconfig 30-import sysconfig
31+import warnings
32+warnings.filterwarnings("ignore", category=DeprecationWarning)
32+from distutils import sysconfig 33+from distutils import sysconfig
33 34
34 valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', 35 valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',