python3: base-nova compatibility

The vfs is now populated with the python libs using a tar file system.
This is necessary because providing the zip from the rom did not work on NOVA.
The issue here is that python's zipimporter uses fseek with SEEK_END to
find the zip header. Unfortunately, the file size cannot be correctly
determined from the ROM session (see #1920) so that the fseek fails.
This commit is contained in:
Johannes Schlatow
2018-06-26 17:35:57 +02:00
committed by Norman Feske
parent e6ee017e18
commit ea789fda0c
4 changed files with 21 additions and 8 deletions

View File

@@ -207,11 +207,17 @@ $(PYTHON3_ZIP):
$(MSG_MERGE)$(notdir $@)
$(VERBOSE)cd $(PYTHON_DIR)/Lib; zip -rq $(PYTHON3_ZIP) *
PYTHON3_TAR = $(BUILD_BASE_DIR)/bin/python3.tar
$(PYTHON3_TAR):
$(MSG_MERGE)$(notdir $@)
$(VERBOSE)tar cfh $@ -C $(PYTHON_DIR) Lib
#
# Generate python3.zip at the build stage, not the dependency stage, of the
# build system.
#
ifeq ($(called_from_lib_mk),yes)
python3.lib.tag: $(PYTHON3_ZIP)
python3.lib.tag: $(PYTHON3_ZIP) $(PYTHON3_TAR)
endif