Browse Source

python: fixed _python_sysroot paths

AFAIK sysroot is combined with prefix/exec_prefix, so sysroot shouldn't
include "/usr". (cf. the HostPython function in older versions of
python-package.mk)

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lilik-openwrt-22.03
Jeffery To 9 years ago
parent
commit
94578145cd
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      lang/python/Makefile
  2. +3
    -3
      lang/python/files/python-host.mk

+ 1
- 1
lang/python/Makefile View File

@ -12,7 +12,7 @@ include ./files/python-package.mk
PKG_NAME:=python PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_RELEASE:=2
PKG_RELEASE:=3
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)


+ 3
- 3
lang/python/files/python-host.mk View File

@ -13,10 +13,10 @@ HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(STAGING_DIR_HOST)/$(HOST_PYTHON_PKG_DI
define HostPython define HostPython
if [ "$(strip $(3))" == "HOST" ]; then \ if [ "$(strip $(3))" == "HOST" ]; then \
export PYTHONPATH="$(HOST_PYTHONPATH)"; \ export PYTHONPATH="$(HOST_PYTHONPATH)"; \
export _python_sysroot="$(STAGING_DIR_HOST)/usr"; \
export _python_sysroot="$(STAGING_DIR_HOST)"; \
else \ else \
export PYTHONPATH="$(PYTHONPATH)"; \ export PYTHONPATH="$(PYTHONPATH)"; \
export _python_sysroot="$(STAGING_DIR)/usr"; \
export _python_sysroot="$(STAGING_DIR)"; \
fi; \ fi; \
export PYTHONOPTIMIZE=""; \ export PYTHONOPTIMIZE=""; \
export PYTHONDONTWRITEBYTECODE=1; \ export PYTHONDONTWRITEBYTECODE=1; \
@ -29,7 +29,7 @@ endef
# These configure args are needed in detection of path to Python header files # These configure args are needed in detection of path to Python header files
# using autotools. # using autotools.
HOST_CONFIGURE_ARGS += \ HOST_CONFIGURE_ARGS += \
_python_sysroot="$(STAGING_DIR_HOST)/usr" \
_python_sysroot="$(STAGING_DIR_HOST)" \
_python_prefix="/usr" \ _python_prefix="/usr" \
_python_exec_prefix="/usr" _python_exec_prefix="/usr"


Loading…
Cancel
Save