[oe-commits] [bitbake] branch 1.36 updated: fetch2: fix import error for Python 3.6.5

git at git.openembedded.org git at git.openembedded.org
Mon Jul 2 10:46:42 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch 1.36
in repository bitbake.

The following commit(s) were added to refs/heads/1.36 by this push:
     new e4fcf4d  fetch2: fix import error for Python 3.6.5
e4fcf4d is described below

commit e4fcf4d9cef6816afac9eebb8d57c82cd1ceb293
Author: Tzu Hsiang Lin <t9360341 at ntut.org.tw>
AuthorDate: Tue May 22 01:56:44 2018 +0800

    fetch2: fix import error for Python 3.6.5
    
    When running bitbake command with Python 3.6.5 always result in
    import error causing by the change of distutils module.
    This patch replaces the method to search executable in PATH by
    "/usr/bin/env <command>".
    
    Signed-off-by: Tzu Hsiang Lin <t9360341 at ntut.org.tw>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/clearcase.py | 3 +--
 lib/bb/fetch2/npm.py       | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/bb/fetch2/clearcase.py b/lib/bb/fetch2/clearcase.py
index 36beab6..3a6573d 100644
--- a/lib/bb/fetch2/clearcase.py
+++ b/lib/bb/fetch2/clearcase.py
@@ -69,7 +69,6 @@ from   bb.fetch2 import FetchMethod
 from   bb.fetch2 import FetchError
 from   bb.fetch2 import runfetchcmd
 from   bb.fetch2 import logger
-from   distutils import spawn
 
 class ClearCase(FetchMethod):
     """Class to fetch urls via 'clearcase'"""
@@ -107,7 +106,7 @@ class ClearCase(FetchMethod):
         else:
             ud.module = ""
 
-        ud.basecmd = d.getVar("FETCHCMD_ccrc") or spawn.find_executable("cleartool") or spawn.find_executable("rcleartool")
+        ud.basecmd = d.getVar("FETCHCMD_ccrc") or "/usr/bin/env cleartool || rcleartool"
 
         if d.getVar("SRCREV") == "INVALID":
           raise FetchError("Set a valid SRCREV for the clearcase fetcher in your recipe, e.g. SRCREV = \"/main/LATEST\" or any other label of your choice.")
diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index b5f148c..ccc287b 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -32,7 +32,6 @@ from   bb.fetch2 import runfetchcmd
 from   bb.fetch2 import logger
 from   bb.fetch2 import UnpackError
 from   bb.fetch2 import ParameterError
-from   distutils import spawn
 
 def subprocess_setup():
     # Python installs a SIGPIPE handler by default. This is usually not what

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list