On 6 April 2018 at 20:57, Juro Bystricky <juro.bystri...@intel.com> wrote:
> In order to remove timestamps from all .pyc files we need to recompile
> them with python3-native, as we cannot rely on the host python being
> able to do that. Both python-native and python3-native derive the timestamp
> from SOURCE_DATE_EPOCH if present.
> However, building python3-native can be computationally expensive, so
> we resort to python3-native only when building reproducible packages:
> (BUILD_REPRODUCIBLE_BINARIES = '1'), otherwise we use the host python3.

The logical extension of this is that every recipe that ships .py
needs to depend on python3-native so that it can recompile.

However, there's another solution...

.pyc files are basically a four byte magic number, a four byte
timestamp, and then the byte code.  It won't be that many lines of
Python in a do_package[postfunc] to search for __pycache__/*.pyc files
in the packages and replace the timestamp with SOURCE_DATE_EPOCH if
reproducible builds are enabled.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to