@ -17,21 +17,10 @@ PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
PYTHON := python$( PYTHON_VERSION)
HOST_PYTHON_LIB_DIR := $( STAGING_DIR_HOST) /lib/python$( PYTHON_VERSION)
HOST_PYTHON_LIB_DIR := $( STAGING_DIR_HOST) /usr/ lib/python$( PYTHON_VERSION)
HOST_PYTHON_BIN := $( STAGING_DIR_HOST) /bin/python2
PYTHONPATH := $( PYTHON_LIB_DIR) :$( STAGING_DIR) /$( PYTHON_PKG_DIR) :$( PKG_INSTALL_DIR) /$( PYTHON_PKG_DIR)
d e f i n e H o s t P y t h o n
( export PYTHONPATH = " $( PYTHONPATH) " ; \
export PYTHONOPTIMIZE = "" ; \
export PYTHONDONTWRITEBYTECODE = 1; \
export _python_sysroot = " $( STAGING_DIR) " ; \
export _python_prefix = "/usr" ; \
export _python_exec_prefix = "/usr" ; \
$( 1) \
$( HOST_PYTHON_BIN) $( 2) ; \
)
e n d e f
# These configure args are needed in detection of path to Python header files
# using autotools.
@ -94,6 +83,8 @@ define PyPackage
endef
e n d e f
$( call include_mk , python -host .mk )
# $(1) => build subdir
# $(2) => additional arguments to setup.py
# $(3) => additional variables
@ -114,6 +105,8 @@ define Build/Compile/PyMod
$( 3) \
, \
./setup.py $( 2) \
, \
$( PYTHONPATH) \
)
find $( PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
e n d e f