python,python3: undo egg-info removal

This reverts commits 4333d1dcbf and
074d2863be, making Python packages
discoverable again by pkg_resources.

Fixes #5361.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2018-01-08 17:26:54 +08:00
parent f25da592f1
commit c5cbd44cea
6 changed files with 2 additions and 18 deletions

View File

@@ -46,10 +46,6 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
exit 1
}
# delete egg-info directories
[ "$PYTHON3_KEEP_EGGINFO" == "1" ] || \
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
if [ "$mode" == "sources" ] ; then
# Copy only python source files
find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f

View File

@@ -32,8 +32,6 @@ ifdef CONFIG_USE_MIPS16
TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
endif
PYTHON3_KEEP_EGGINFO ?= 0
define Py3Package
define Package/$(1)-src
@@ -70,13 +68,11 @@ define Py3Package
$(call Py3Package/$(1)/install,$$(1))
find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
if [ -e files/python3-package-install.sh ] ; then \
PYTHON3_KEEP_EGGINFO="$(PYTHON3_KEEP_EGGINFO)" \
$(SHELL) files/python3-package-install.sh \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON3_BIN)" "$$(2)" \
"$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" ; \
elif [ -e $(STAGING_DIR)/mk/python3-package-install.sh ] ; then \
PYTHON3_KEEP_EGGINFO="$(PYTHON3_KEEP_EGGINFO)" \
$(SHELL) $(STAGING_DIR)/mk/python3-package-install.sh \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON3_BIN)" "$$(2)" \