Help with building app recipe
Hello
I am trying to build a simple recipe for a package called "pyotherside". It currently looks like this:
------------------------------------------------------------------------
SUMMARY = "Python3 bindings for Qt5"
DESCRIPTION = "New framework for including pyhton interpreter into Qt5 apps" HOMEPAGE = "http://thp.io/2011/pyotherside/"
LICENSE = "MIT"LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR\}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PV = "1.2+git${SRCPV}"
SRCREV = "87e5eaf4707261dfcb37d7daadef018266c83d5a"
SRC_URI = "git://github.com/thp/pyotherside.git;branch=master;protocol=git \
"S = "${WORKDIR}/git/"
DEPENDS = "qtdeclarative python3 python3-native"
RDEPENDS_${PN} = "qtdeclarative-qmlplugins"
require recipes-qt/qt5/qt5.inc
------------------------------------------------------------------------
It is WIP, so e.g. the license is stil wrong.
The package depends on Qt5 and Python3.
I am currently experiencing two (rather small) problems:
1.) the configure step does not find "python3-config". It is located in tmp/sysroots/i686-linux/usr/bin/python3-native
If I do a devshell and edit run.do_configure, I can add this path to the PATH env variable, and then everything works.
How can I modify my recipe, so that this path is automatically added?
2.) The "python3-config" script just uses "#!/usr/bin/env python" to define its interpreter, so the system starts the script with python2. If I change the script manually, it works.
What would be the correct way to change my receipt to make it work? Or would I need to change the python3 recipe to patch this file?
Thanks for your help!
Michael
P.S.: Seems, pyotherside is working nicely...
Quoted 7 lines · Neuer User
require recipes-qt/qt5/qt5.inc
------------------------------------------------------------------------It is WIP, so e.g. the license is stil wrong.
The package depends on Qt5 and Python3.
In that case, I would have expected to see
inherit python3native qmake5
in your recipe.
Quoted 4 lines
I am currently experiencing two (rather small) problems:
1.) the configure step does not find "python3-config". It is located in tmp/sysroots/i686-linux/usr/bin/python3-native
I haven't used python3 in combination with OE yet. Though, this should likely have been handled by
inherit python3native
Cheers,
Anders
Signature · 2 lines
Anders Darander ChargeStorm AB / eStorm AB
Am 16.05.2014 14:04, schrieb Anders Darander:
Quoted 21 lines · Neuer User
Quoted 8 lines
require recipes-qt/qt5/qt5.inc
------------------------------------------------------------------------It is WIP, so e.g. the license is stil wrong.
The package depends on Qt5 and Python3.
In that case, I would have expected to see
inherit python3native qmake5
in your recipe.
Quoted 4 lines
I am currently experiencing two (rather small) problems:
1.) the configure step does not find "python3-config". It is located in tmp/sysroots/i686-linux/usr/bin/python3-native
Quoted 7 lines
I haven't used python3 in combination with OE yet. Though, this should likely have been handled by
inherit python3nativeCheers,
Anders
Great, that helped with no 1.). Still a lot to learn for me.
No 2. is still open, though. Is that a problem of my recipe or rather a generic problem of the python3 recipe? I could patch the python3 recipe, so that it changes the interpreter line to "python3".
Am 16.05.2014 14:16, schrieb Neuer User:
Quoted 8 lines
Am 16.05.2014 14:04, schrieb Anders Darander:
Great, that helped with no 1.). Still a lot to learn for me.
No 2. is still open, though. Is that a problem of my recipe or rather a generic problem of the python3 recipe? I could patch the python3 recipe, so that it changes the interpreter line to "python3".
Hmm the python3-native recipe has this install function:
----------------------------------------------------------
do_install() {
install -d ${D}${libdir}/pkgconfig
oe_runmake 'DESTDIR=${D}' install
if [ -e ${WORKDIR}/sitecustomize.py ]; then
install -m 0644 ${WORKDIR}/sitecustomize.py
${D}/${libdir}/python${PYTHON_MAJMIN}
fi
install -d ${D}${bindir}/${PN}
install -m 0755 Parser/pgen ${D}${bindir}/${PN}
# Make sure we use /usr/bin/env python
for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python
${D}${bindir}/${PN}`; do
sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
done
}----------------------------------------------------------
If I change the sed line to "#!/usr/bin/env python3", that would probably work then. But would it break something else?
Quoted 2 lines · Neuer User
If I change the sed line to "#!/usr/bin/env python3", that would probably work then. But would it break something else?
would be fine.
Folks,
I'm trying to accomplish this in a 64bits host machine. But I'm getting errors the following error on compile task:
| In file included from /<snip>/tmp/sysroots/x86_64-linux/usr/include/python3.3m/Python.h:50:0,
| from ../../git/src/qpython_priv.h:22, | from moc_qpython_priv.cpp:9: | /<snip>/sysroots/x86_64-linux/usr/include/python3.3m/pyport.h:820:2:
error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^
Searching on Google it says that this is a known bug when trying to cross-compile Python stuff for 32bits machines on 64bits hosts.
It seems that the guys from Buildroot could get this solved:
http://lists.busybox.net/pipermail/buildroot/2011-August/045257.html
I'm trying to find the "magical" patch to how to get this fixed.
Also found this link too:
http://blog.devork.be/2009/02/compiling-32-bit-python-on-amd64.html
But I'm not quite sure how to get this fixed on Yocto. Should it need to be fixed on the pyotherside, or python3, or python3-native recipe?
Any directions are appreciated.
Regards,
--
*dS
Diego Sueiro
Administrador do Embarcados www.embarcados.com.br<http://www.embarcados.com.br/?utm_source=assinatura_diego&utm_medium=e-mail&utm_campaign=Assinatura%20Email%20Diego>
/*long live rock 'n roll*/
Quoted 11 lines · Khem Raj
Quoted 2 lines · Neuer User
If I change the sed line to "#!/usr/bin/env python3", that would probably work then. But would it break something else?
would be fine.
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto