Bug 8446

Summary: fix .pyc/.pyo buildpaths issue
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: meta.mr.watcher, meta.watcher, sgw
Version: 2.6   
Target Milestone: 2.6 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on: 7058    
Bug Blocks:    

Description Robert Yang 2015-10-06 09:22:57 UTC
The .pyc files usually contain build path like:

i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/buildarea/lyang1/test_p/tmp/sysroots/qemux86
And:
_PYTHON_PROJECT_BASE=/buildarea/lyang1/test_p/tmp/work/i586-poky-linux/python/2.7.9-r1/build

They are safe, so ignore them.
Comment 1 Hongxu Jia 2016-02-25 02:34:45 UTC
We need to do the investigation to find a way to replace
build path with target path in .pyc/.pyo files.
Comment 2 Hongxu Jia 2016-07-29 02:14:16 UTC
The fix has been sent to oe-core mailing list, but no reply.

I should resend it in 2.3.
Comment 3 Hongxu Jia 2018-07-26 13:20:41 UTC
Merged to oe-core

commit 21f0c5a50e00ac34975d79fd48f08730d8f19b15
Author: Hongxu Jia <hongxu.jia@windriver.com>
Date:   Thu Jul 19 22:59:04 2018 +0800

    distutils/setuptools, distutils3/setuptools3: improve reproducibility

    - Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools

    - Supply "--root" directory to the "install" command, and use
      it as a prefix to strip off the purported filename encoded
      in bytecode files. (It strips build path prefix from .pyc files)