Bug 8446 - fix .pyc/.pyo buildpaths issue
Summary: fix .pyc/.pyo buildpaths issue
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.6
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.6 M3
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on: 7058
Blocks:
  Show dependency tree
 
Reported: 2015-10-06 09:22 UTC by Robert Yang
Modified: 2018-07-26 13:20 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)