-require python.inc
+require python27.inc
EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
PR = "${INC_PR}.1"
SRC_URI += "\
- file://05-enable-ctypes-cross-build.patch \
- file://06-ctypes-libffi-fix-configure.patch \
- file://10-distutils-fix-swig-parameter.patch \
- file://11-distutils-never-modify-shebang-line.patch \
- file://12-distutils-prefix-is-inside-staging-area.patch \
- 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://05-enable-ctypes-cross-build.patch;patch=1 \
+ file://06-ctypes-libffi-fix-configure.patch;patch=1 \
+ file://10-distutils-fix-swig-parameter.patch;patch=1 \
+ file://11-distutils-never-modify-shebang-line.patch;patch=1 \
+ file://12-distutils-prefix-is-inside-staging-area.patch;patch=1 \
+ file://debug.patch;patch=1 \
+ file://unixccompiler.patch;patch=1 \
+ file://nohostlibs.patch;patch=1 \
+ file://multilib.patch;patch=1 \
+ file://add-md5module-support.patch;patch=1 \
+ file://builddir.patch;patch=1 \
+ file://parallel-makeinst-create-bindir.patch;patch=1 \
"
S = "${WORKDIR}/Python-${PV}"
RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native"
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
+# EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
EXTRA_OEMAKE = '\
BUILD_SYS="" \
do_install() {
oe_runmake 'DESTDIR=${D}' install
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+ install -d ${D}${bindir}/
+ install -m 0755 Parser/pgen ${D}${bindir}/
# Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
done
# "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
+ #ln -s python-native/python ${D}${bindir}/nativepython
}
-require python.inc
+require python27.inc
DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
PR = "${INC_PR}.3"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI += "\
- file://01-use-proper-tools-for-cross-build.patch \
- file://03-fix-tkinter-detection.patch \
- file://05-enable-ctypes-cross-build.patch \
- file://06-ctypes-libffi-fix-configure.patch \
- file://06-avoid_usr_lib_termcap_path_in_linking.patch \
+ file://01-fix-have-long-long-format.patch;patch=1 \
+ file://01-use-proper-tools-for-cross-build.patch;patch=1 \
+ file://03-fix-tkinter-detection.patch;patch=1 \
+ file://05-enable-ctypes-cross-build.patch;patch=1 \
+ file://06-ctypes-libffi-fix-configure.patch;patch=1 \
+ file://06-avoid_usr_lib_termcap_path_in_linking.patch;patch=1 \
${DISTRO_SRC_URI} \
- file://multilib.patch \
- file://cgi_py.patch \
- file://remove_sqlite_rpath.patch \
- file://setup_py_skip_cross_import_check.patch \
- file://add-md5module-support.patch \
- file://host_include_contamination.patch \
- file://fix_for_using_different_libdir.patch \
- file://setuptweaks.patch \
- file://check-if-target-is-64b-not-host.patch \
- file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
- file://avoid_warning_about_tkinter.patch \
- file://avoid_warning_for_sunos_specific_module.patch \
- file://python-2.7.3-berkeley-db-5.3.patch \
- file://python-2.7.3-remove-bsdb-rpath.patch \
- file://builddir.patch \
- file://python-2.7.3-CVE-2012-2135.patch \
- file://gcc-4.8-fix-configure-Wformat.patch \
- file://fix-makefile-for-ptest.patch \
+ file://multilib.patch;patch=1 \
+ file://cgi_py.patch;patch=1 \
+ file://remove_sqlite_rpath.patch;patch=1 \
+ file://setup_py_skip_cross_import_check.patch;patch=1 \
+ file://add-md5module-support.patch;patch=1 \
+ file://host_include_contamination.patch;patch=1 \
+ file://fix_for_using_different_libdir.patch;patch=1 \
+ file://setuptweaks.patch;patch=1 \
+ file://check-if-target-is-64b-not-host.patch;patch=1 \
+ file://search_db_h_in_inc_dirs_and_avoid_warning.patch;patch=1 \
+ file://avoid_warning_about_tkinter.patch;patch=1 \
+ file://avoid_warning_for_sunos_specific_module.patch;patch=1 \
+ file://python-2.7.3-berkeley-db-5.3.patch;patch=1 \
+ file://python-2.7.3-remove-bsdb-rpath.patch;patch=1 \
+ file://builddir.patch;patch=1 \
+ file://python-2.7.3-CVE-2012-2135.patch;patch=1 \
+ file://gcc-4.8-fix-configure-Wformat.patch;patch=1 \
+ file://fix-makefile-for-ptest.patch;patch=1 \
file://run-ptest \
- file://CVE-2013-4073_py27.patch \
- file://pypirc-secure.patch \
- file://parallel-makeinst-create-bindir.patch \
+ file://CVE-2013-4073_py27.patch;patch=1 \
+ file://pypirc-secure.patch;patch=1 \
+ file://parallel-makeinst-create-bindir.patch;patch=1 \
"
S = "${WORKDIR}/Python-${PV}"
-inherit autotools multilib_header pythonnative
+inherit autotools pythonnative
+# inherit multilib_header
# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
do_compile() {
# regenerate platform specific files, because they depend on system headers
cd Lib/plat-linux2
- include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
+ include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
${STAGING_INCDIR}/linux/cdrom.h \
if [ ! -f Makefile.orig ]; then
install -m 0644 Makefile Makefile.orig
fi
- sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ sed -i -e 's,^LDFLAGS=.*,LDFLAGS+=-L. -L${STAGING_LIBDIR},g' \
-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
export CROSS_COMPILE="${TARGET_PREFIX}"
export PYTHONBUILDDIR="${S}"
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
# After swizzling the makefile, we need to run the build again.
# install can race with the build so we have to run this first, then install
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
DESTDIR=${D} LIBDIR=${libdir}
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
fi
- oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+# oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
}
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python2.7 TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
+#do_install_append_class-nativesdk () {
+# create_wrapper ${D}${bindir}/python2.7 TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+#}
SSTATE_SCAN_FILES += "Makefile"
PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
RPROVIDES_${PN}-core = "${PN}"
RRECOMMENDS_${PN}-core = "${PN}-readline"
RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
+# RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
# package libpython2
PACKAGES =+ "lib${BPN}2"
FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-misc"
#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
+#inherit ptest
# This must come after inherit ptest for the override to take effect
do_install_ptest() {
PACKAGES += "${PN}-man"
FILES_${PN}-man = "${datadir}/man"
-BBCLASSEXTEND = "nativesdk"
+# BBCLASSEXTEND = "nativesdk"
+
+# old OE tree hacks:
+
+# additional stuff -dev
+
+FILES_${PN}-dev += "\
+ ${includedir} \
+ ${libdir}/lib*${SOLIBSDEV} \
+ ${libdir}/*.la \
+ ${libdir}/*.a \
+ ${libdir}/*.o \
+ ${libdir}/pkgconfig \
+ ${base_libdir}/*.a \
+ ${base_libdir}/*.o \
+ ${datadir}/aclocal \
+ ${datadir}/pkgconfig \
+"
+