Refactor to use bb.utils.vercmp_string_op() instead of StrictVersion from distutils
[YOCTO #14610] Signed-off-by: Tim Orling <[email protected]> --- meta/classes/waf.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta/classes/waf.bbclass b/meta/classes/waf.bbclass index df0ab8d73ff..bc594d3c6b1 100644 --- a/meta/classes/waf.bbclass +++ b/meta/classes/waf.bbclass @@ -43,14 +43,13 @@ BB_HASHBASE_WHITELIST += "WAFLOCK" python waf_preconfigure() { import subprocess - from distutils.version import StrictVersion subsrcdir = d.getVar('S') python = d.getVar('WAF_PYTHON') wafbin = os.path.join(subsrcdir, 'waf') try: result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT) version = result.decode('utf-8').split()[1] - if StrictVersion(version) >= StrictVersion("1.8.7"): + if bb.utils.vercmp_string_op(version, "1.8.7", ">="): d.setVar("WAF_EXTRA_CONF", "--bindir=${bindir} --libdir=${libdir}") except subprocess.CalledProcessError as e: bb.warn("Unable to execute waf --version, exit code %d. Assuming waf version without bindir/libdir support." % e.returncode) -- 2.30.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160455): https://lists.openembedded.org/g/openembedded-core/message/160455 Mute This Topic: https://lists.openembedded.org/mt/88356451/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
