mirror of
https://github.com/openwrt/packages.git
synced 2025-12-20 09:31:20 +00:00
python,python3: honour the SOURCE_DATE_EPOCH for the build-info
The Modules/getbuildinfo.c allows the use of DATE and TIME macros to be defined via CFLAGS. These vars, control the build date & time when the interpreter is opened, and can be read via the `platform._sys_version()` function. So, a conversion from SOURCE_DATE_EPOCH to DATE & TIME is required at build-time. This is especially needed for `platform._sys_version()` to work. The installation of pip seems to rely on this. The logic has been adapted from: https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Makefile Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
|
||||
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
|
||||
|
||||
PKG_NAME:=python3
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
||||
|
||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||
|
||||
Reference in New Issue
Block a user