2010-07-06 12:07:49 +00:00
|
|
|
require python.inc
|
2012-07-26 20:34:19 +00:00
|
|
|
|
|
|
|
EXTRANATIVEPATH += "bzip2-native"
|
2016-04-28 06:38:50 +00:00
|
|
|
DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
|
2012-07-19 17:46:06 +00:00
|
|
|
PR = "${INC_PR}.1"
|
2010-11-08 18:34:46 +00:00
|
|
|
|
2013-05-08 08:29:48 +00:00
|
|
|
SRC_URI += "\
|
2015-02-20 21:40:47 +00:00
|
|
|
file://05-enable-ctypes-cross-build.patch \
|
|
|
|
file://10-distutils-fix-swig-parameter.patch \
|
|
|
|
file://11-distutils-never-modify-shebang-line.patch \
|
2016-04-06 14:58:36 +00:00
|
|
|
file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
|
2015-02-20 21:40:47 +00:00
|
|
|
file://debug.patch \
|
|
|
|
file://unixccompiler.patch \
|
|
|
|
file://nohostlibs.patch \
|
|
|
|
file://multilib.patch \
|
|
|
|
file://add-md5module-support.patch \
|
|
|
|
file://builddir.patch \
|
|
|
|
file://parallel-makeinst-create-bindir.patch \
|
|
|
|
file://revert_use_of_sysconfigdata.patch \
|
2011-12-28 00:12:01 +00:00
|
|
|
"
|
2016-08-03 18:49:41 +00:00
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
S = "${WORKDIR}/Python-${PV}"
|
|
|
|
|
2014-05-12 13:55:35 +00:00
|
|
|
FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
|
2012-11-19 22:16:22 +00:00
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
inherit native
|
|
|
|
|
2017-02-26 07:39:19 +00:00
|
|
|
require python-native-${PYTHON_MAJMIN}-manifest.inc
|
2011-12-17 10:08:53 +00:00
|
|
|
|
2016-04-28 06:38:50 +00:00
|
|
|
EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
|
2012-07-19 17:46:06 +00:00
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
EXTRA_OEMAKE = '\
|
|
|
|
LIBC="" \
|
|
|
|
STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
|
|
|
|
STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
|
|
|
|
'
|
|
|
|
|
2015-02-26 21:27:25 +00:00
|
|
|
do_configure_append() {
|
2015-02-20 21:40:47 +00:00
|
|
|
autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
|
2011-05-11 08:40:17 +00:00
|
|
|
}
|
|
|
|
|
2010-07-06 12:07:49 +00:00
|
|
|
do_install() {
|
|
|
|
oe_runmake 'DESTDIR=${D}' install
|
2012-07-19 17:46:06 +00:00
|
|
|
install -d ${D}${bindir}/${PN}
|
|
|
|
install -m 0755 Parser/pgen ${D}${bindir}/${PN}
|
2011-07-18 16:19:07 +00:00
|
|
|
|
|
|
|
# Make sure we use /usr/bin/env python
|
2012-07-19 17:46:06 +00:00
|
|
|
for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
|
2011-07-18 16:19:07 +00:00
|
|
|
sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
|
|
|
|
done
|
2013-06-12 16:25:05 +00:00
|
|
|
|
|
|
|
# Add a symlink to the native Python so that scripts can just invoke
|
|
|
|
# "nativepython" and get the right one without needing absolute paths
|
|
|
|
# (these often end up too long for the #! parser in the kernel as the
|
|
|
|
# buffer is 128 bytes long).
|
|
|
|
ln -s python-native/python ${D}${bindir}/nativepython
|
2015-02-11 23:57:49 +00:00
|
|
|
|
2014-09-08 11:58:41 +00:00
|
|
|
# We don't want modules in ~/.local being used in preference to those
|
|
|
|
# installed in the native sysroot, so disable user site support.
|
|
|
|
sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
|
2010-07-06 12:07:49 +00:00
|
|
|
}
|