All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python3: silence DeprecationWarnings in python3-config
@ 2021-11-02 18:02 Ross Burton
  2021-11-02 18:05 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2021-11-02 18:02 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/python/python3/python-config.patch | 5 +++--
 1 file 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.
 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',
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-02 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 18:02 [PATCH] python3: silence DeprecationWarnings in python3-config Ross Burton
2021-11-02 18:05 ` [OE-core] " Khem Raj
2021-11-02 20:06   ` Ross Burton
2021-11-02 20:12     ` Khem Raj
2021-11-02 21:05       ` Tim Orling

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.