Browse Source

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>
lilik-openwrt-22.03
Jeffery To 7 years ago
parent
commit
c5cbd44cea
6 changed files with 2 additions and 18 deletions
  1. +1
    -1
      lang/python/python/Makefile
  2. +0
    -4
      lang/python/python/files/python-package-install.sh
  3. +0
    -4
      lang/python/python/files/python-package.mk
  4. +1
    -1
      lang/python/python3/Makefile
  5. +0
    -4
      lang/python/python3/files/python3-package-install.sh
  6. +0
    -4
      lang/python/python3/files/python3-package.mk

+ 1
- 1
lang/python/python/Makefile View File

@ -12,7 +12,7 @@ include ./files/python-version.mk
PKG_NAME:=python PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)


+ 0
- 4
lang/python/python/files/python-package-install.sh View File

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


+ 0
- 4
lang/python/python/files/python-package.mk View File

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


+ 1
- 1
lang/python/python3/Makefile View File

@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3 PKG_NAME:=python3
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz


+ 0
- 4
lang/python/python3/files/python3-package-install.sh View File

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


+ 0
- 4
lang/python/python3/files/python3-package.mk View File

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


Loading…
Cancel
Save