################################################################################
################################################################################
PYTHON_VERSION_MAJOR = 2.7
PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).8
PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz
PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION)
PYTHON_LICENSE = Python software foundation license v2, others
PYTHON_LICENSE_FILES = LICENSE
# Python needs itself to be built, so in order to cross-compile
# Python, we need to build a host Python first. This host Python is
# also installed in $(HOST_DIR), as it is needed when cross-compiling
# third-party Python modules.
HOST_PYTHON_CONF_OPTS += \
# Make sure that LD_LIBRARY_PATH overrides -rpath.
# This is needed because libpython may be installed at the same time that
HOST_PYTHON_CONF_ENV += \
LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
# Building host python in parallel sometimes triggers a "Bus error"
# during the execution of "./python setup.py build" in the
# installation step. It is probably due to the installation of a
# shared library taking place in parallel to the execution of
# ./python, causing spurious Bus error. Building host-python with
# MAKE1 has shown to workaround the problem.
HOST_PYTHON_MAKE = $(MAKE1)
PYTHON_DEPENDENCIES = host-python libffi
HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
PYTHON_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)
PYTHON_DEPENDENCIES += readline
ifeq ($(BR2_PACKAGE_PYTHON_CURSES),y)
PYTHON_DEPENDENCIES += ncurses
PYTHON_CONF_OPTS += --disable-curses
ifeq ($(BR2_PACKAGE_PYTHON_PYEXPAT),y)
PYTHON_DEPENDENCIES += expat
PYTHON_CONF_OPTS += --with-expat=system
PYTHON_CONF_OPTS += --with-expat=none
ifeq ($(BR2_PACKAGE_PYTHON_BSDDB),y)
PYTHON_DEPENDENCIES += berkeleydb
PYTHON_CONF_OPTS += --disable-bsddb
ifeq ($(BR2_PACKAGE_PYTHON_SQLITE),y)
PYTHON_DEPENDENCIES += sqlite
PYTHON_CONF_OPTS += --disable-sqlite3
ifeq ($(BR2_PACKAGE_PYTHON_SSL),y)
PYTHON_DEPENDENCIES += openssl
PYTHON_CONF_OPTS += --disable-ssl
ifneq ($(BR2_PACKAGE_PYTHON_CODECSCJK),y)