1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 21:03:56 +02:00
Commit Graph

3 Commits

Author SHA1 Message Date
Alexandru Ardelean
f53904ebda lang/python/python-package-install.sh: assign SOURCE_DATE_EPOCH to PYTHONHASHSEED
Following a discussion on bugs.python.org:
* https://bugs.python.org/issue29708
* https://bugs.python.org/msg313384

It seems that setting a fixed value to PYTHONHASHSEED guarantees that
the bytecodes are generated consistently/in a reproducible manner.

Hopefully, this is the last bit to make Python3 build reproducible.
Tested this locally on a few files [that were not reproducible without
this change].

The PYTHONHASHSEED is only assigned to the host Python/Python3 during
compilation of byte-codes [from python source].

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-03-07 20:52:15 +02:00
Alexandru Ardelean
f4c098cc85 python,python3: merge package install scripts
The only difference just a parameter for Python3
[ -b to compile bytecodes in legacy mode ].
No need to keep 2 almost identical files now
that they're exported.

I'm a bit scared of that param, since it may get
removed at some point.
But let's see until then.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-01-10 23:06:22 +02:00
Alexandru Ardelean
ccdc6bc530 python,python3: export mk files outside of python package dirs
Since `lang/python` is it's own folder of Python packages
(for both Python 2 & 3), and these build rules are needed
in a lot of packages [especially Python packages],
putting them here makes sense architecturally,
to be shared.

This also helps get rid of the `include_mk` construct
which relies on OpenWrt core to provide, and seems
like a broken design idea that has persisted for a while.
Reason is: it requires that Python 2/3 be built to provide
these mk files for other Python packages,
which seems like a bad idea.

Long-term, there could be an issue where some other feeds
would require these mk files [e.g. telephony] for
some Python packages.
We'll see how we handle this a bit later.

For now we limit this to this feed.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-01-10 23:01:51 +02:00