Merge pull request #5360 from commodo/python_reproducible
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 14 Jan 2018 15:32:57 +0000 (17:32 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Jan 2018 15:32:57 +0000 (17:32 +0200)
python,python3: honour the SOURCE_DATE_EPOCH for the build-info

1  2 
lang/python/python/Makefile
lang/python/python3/Makefile

index 84415d6bf868e44182b2cd7beccc89efd9d9d983,8064a6b83cc719ed5078b367dceb04645968d2b4..58ddf90d1b4946709c6e80c5cfa70e7eb5283612
@@@ -8,11 -8,11 +8,11 @@@
  include $(TOPDIR)/rules.mk
  
  # For PYTHON_VERSION
 -include ./files/python-version.mk
 +include ../python-version.mk
  
  PKG_NAME:=python
  PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
- PKG_RELEASE:=8
+ PKG_RELEASE:=9
  
  PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
  PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@@ -22,10 -22,10 +22,10 @@@ PKG_LICENSE:=PS
  PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
  
  # This file provides the necsessary host build variables
 -include ./files/python-host.mk
 +include ../python-host.mk
  
  # For PyPackage
 -include ./files/python-package.mk
 +include ../python-package.mk
  
  PKG_FIXUP:=autoreconf
  PKG_INSTALL:=1
@@@ -190,6 -190,16 +190,6 @@@ define Build/Compil
        $(call Build/Compile/python-pip)
  endef
  
 -define Build/InstallMkFiles
 -      $(INSTALL_DIR) $(STAGING_DIR)/mk/
 -      $(INSTALL_DATA) \
 -              ./files/python-package.mk \
 -              ./files/python-host.mk \
 -              ./files/python-version.mk \
 -              ./files/python-package-install.sh \
 -              $(STAGING_DIR)/mk/
 -endef
 -
  define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
                $(1)/usr/lib/python$(PYTHON_VERSION)/
 -      $(call Build/InstallMkFiles)
  endef
  
  PYTHON_BASE_LIB_FILES:= \
@@@ -287,6 -298,7 +287,6 @@@ define Host/Compil
  endef
  
  define Host/Install
 -      $(call Build/InstallMkFiles)
        $(MAKE) -C $(HOST_BUILD_DIR) install
        $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2
index dbda239abea34f20ae7174ac92d4ee6fb6365756,ac1ad01c3b68ff5fb8eac4efe2a159ca22c9d485..0a519761f446faef0f5df6d27d953e068e9433b6
@@@ -8,13 -8,13 +8,13 @@@
  include $(TOPDIR)/rules.mk
  
  # The file included below defines PYTHON_VERSION
 -include ./files/python3-version.mk
 +include ../python3-version.mk
  
  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
@@@ -25,10 -25,10 +25,10 @@@ PKG_LICENSE:=PS
  PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
  
  # This file provides the necsessary host build variables
 -include ./files/python3-host.mk
 +include ../python3-host.mk
  
  # For Py3Package
 -include ./files/python3-package.mk
 +include ../python3-package.mk
  
  PKG_FIXUP:=autoreconf
  PKG_INSTALL:=1
@@@ -194,6 -194,16 +194,6 @@@ define Build/Compil
        $(call Build/Compile/python3-pip)
  endef
  
 -define Build/InstallMkFiles
 -      $(INSTALL_DIR) $(STAGING_DIR)/mk/
 -      $(INSTALL_DATA) \
 -              ./files/python3-package.mk \
 -              ./files/python3-host.mk \
 -              ./files/python3-version.mk \
 -              ./files/python3-package-install.sh \
 -              $(STAGING_DIR)/mk/
 -endef
 -
  define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
                $(1)/usr/lib/python$(PYTHON_VERSION)/
 -      $(call Build/InstallMkFiles)
  endef
  
  PYTHON3_BASE_LIB_FILES:= \
@@@ -284,6 -295,7 +284,6 @@@ define Host/Compil
  endef
  
  define Host/Install
 -      $(call Build/InstallMkFiles)
        $(MAKE) -C $(HOST_BUILD_DIR) install
        $(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3