mirror of
https://git.yoctoproject.org/poky
synced 2026-02-02 06:48:43 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
859776220f
commit
851be8baed
@@ -14,7 +14,6 @@ as appropriate.
|
||||
Upstream-Status: Inappropriate [Embedded Specific]
|
||||
|
||||
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
|
||||
:
|
||||
|
||||
---
|
||||
Misc/python-config.in | 10 +++++-----
|
||||
@@ -24,11 +23,13 @@ diff --git a/Misc/python-config.in b/Misc/python-config.in
|
||||
index ebd99da..13e57ae 100644
|
||||
--- a/Misc/python-config.in
|
||||
+++ b/Misc/python-config.in
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -6,7 +6,9 @@
|
||||
import getopt
|
||||
import os
|
||||
import sys
|
||||
-import sysconfig
|
||||
+import warnings
|
||||
+warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
+from distutils import sysconfig
|
||||
|
||||
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
|
||||
|
||||
Reference in New Issue
Block a user