Files
meta-openembedded/meta-oe/recipes-multimedia/jack/jack/0001-Conceal-imp-warnings-in-Python3.patch
Martin Jansa 2c6caea18f jack: fix build with python3 on host
* first backport from waflib fixes:
| DEBUG: Executing shell function do_configure
| Traceback (most recent call last):
|   File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/./waf", line 166, in <module>
|     from waflib import Scripting
|   File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Scripting.py", line 10, in <module>
|     from waflib import Utils, Configure, Logs, Options, ConfigSet, Context, Errors, Build, Node
|   File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Configure.py", line 16, in <module>
|     from waflib import ConfigSet, Utils, Options, Logs, Context, Build, Errors
|   File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Options.py", line 14, in <module>
|     from waflib import Logs, Utils, Context, Errors
|   File "/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Context.py", line 9, in <module>
|     import os, re, imp, sys
| ModuleNotFoundError: No module named 'imp'

  the 2nd one avoids SyntaxWarning from waf --version which causes
  waf_preconfigure to fail, because SyntaxWarning ends in
    waf_preconfigure to fail, because SyntaxWarning ends in bb.utils.vercmp_string_op:

jack/1.9.22/git $ python3 waf --version
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Context.py:617: SyntaxWarning: invalid escape sequence '\_'
  """
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Build.py:107: SyntaxWarning: invalid escape sequence '\*'
  """List of targets to build (default: \*)"""
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/Task.py:1047: SyntaxWarning: invalid escape sequence '\w'
  re_cond = re.compile('(?P<var>\w+)|(?P<or>\|)|(?P<and>&)')
/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/jack/1.9.22/git/waflib/TaskGen.py:730: SyntaxWarning: invalid escape sequence '\w'
  re_m4 = re.compile('@(\w+)@', re.M)
waf 2.0.12 (54841218840ffa34fddf834680a5a17db69caa12)

As reported in
https://lists.openembedded.org/g/openembedded-core/message/194348

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-27 09:48:32 -08:00

35 lines
1004 B
Diff

From f864a2aa29377a77c3aef61ce917cc03d099c430 Mon Sep 17 00:00:00 2001
From: Thomas Nagy <tnagy@waf.io>
Date: Wed, 14 Aug 2019 22:05:45 +0200
Subject: [PATCH] Conceal imp warnings in Python3
---
Upstream-Status: Backport [from waflib not jack: https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2.patch]
waflib/Context.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/waflib/Context.py b/waflib/Context.py
index 761b521f..38ab03f1 100644
--- a/waflib/Context.py
+++ b/waflib/Context.py
@@ -6,10 +6,17 @@
Classes and functions enabling the command system
"""
-import os, re, imp, sys
+import os, re, sys
from waflib import Utils, Errors, Logs
import waflib.Node
+if sys.hexversion > 0x3040000:
+ import types
+ class imp(object):
+ new_module = lambda x: types.ModuleType(x)
+else:
+ import imp
+
# the following 3 constants are updated on each new release (do not touch)
HEXVERSION=0x2000c00
"""Constant updated on new releases"""