* Is Python Tkinter available for Yocto
@ 2014-04-01 18:59 Jens Lucius
2014-04-04 14:34 ` Jens Lucius
2014-04-10 21:40 ` Building python module after compiling in one recipe Jens Lucius
0 siblings, 2 replies; 6+ messages in thread
From: Jens Lucius @ 2014-04-01 18:59 UTC (permalink / raw)
To: yocto
Hi,
I am a little bit confused if Python Tkinter is included as a package
for python in the Yocto system.
Pro:
- The output of "bitbake -e python | grep ^PACKAGES=" shows a package
called "python-tkinter."
- In
"tmp/work/armv6-vfp-poky-linux-gnueabi/python/2.7.3-r0.3/packages-split"
there is a folder called python-tkinter
Contra:
- There is a patch for python recipe called
"avoid_warning_about_tkinter.patch" which states "_tkinter module needs
tk module along with tcl. tk is not yet integrated in yocto so we skip
the check for this module. Avoid a warning by not adding this module to
missing variable."
- I have included in my recipe: "python-core python-tkinter" which gave
no error, but no tkinter installed and I have tried including
"python-core python-modules" which gave me a lot of python modules, but
still no tkinter. (tried "from Tkinter import *" which gave an error and
no tkinter in /usr/lib/python2.7)
Do I manually need to install another package? Is it included or not? Do
I need to do my own recipe?
Any help would be appreciated.
Thanks,
Jens
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is Python Tkinter available for Yocto
2014-04-01 18:59 Is Python Tkinter available for Yocto Jens Lucius
@ 2014-04-04 14:34 ` Jens Lucius
2014-04-04 14:42 ` Gary Thomas
2014-04-10 21:40 ` Building python module after compiling in one recipe Jens Lucius
1 sibling, 1 reply; 6+ messages in thread
From: Jens Lucius @ 2014-04-04 14:34 UTC (permalink / raw)
To: yocto
> I am a little bit confused if Python Tkinter is included as a package
> for python in the Yocto system.
>
> - There is a patch for python recipe called
> "avoid_warning_about_tkinter.patch" which states "_tkinter module
> needs tk module along with tcl. tk is not yet integrated in yocto so
> we skip the check for this module. Avoid a warning by not adding this
> module to missing variable."
> - I have included in my recipe: "python-core python-tkinter" which
> gave no error, but no tkinter installed and I have tried including
> "python-core python-modules" which gave me a lot of python modules,
> but still no tkinter. (tried "from Tkinter import *" which gave an
> error and no tkinter in /usr/lib/python2.7)
>
> Do I manually need to install another package? Is it included or not?
> Do I need to do my own recipe?
To answer my own question:
Yes Tkinter is included in Python build but as the patch states it needs
tcl as well as tk with tcl already included in Yocto and tk not.
Andrei Gherzan wrote a .bb for OE-Core for tk version 8.5.11 which did
work for me after bumping it to the latest version 8.6.1.
If anybody needs it or wants to integrate it in Yocto here is the bb:
(just remember to include tk and tcl in your build or add dependencies
for them in python).
http://pastebin.com/tRGk0U0c
Jens
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is Python Tkinter available for Yocto
2014-04-04 14:34 ` Jens Lucius
@ 2014-04-04 14:42 ` Gary Thomas
2014-04-04 15:36 ` Jens Lucius
0 siblings, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2014-04-04 14:42 UTC (permalink / raw)
To: yocto
On 2014-04-04 08:34, Jens Lucius wrote:
>
>> I am a little bit confused if Python Tkinter is included as a package for python in the Yocto system.
>>
>> - There is a patch for python recipe called "avoid_warning_about_tkinter.patch" which states "_tkinter module needs tk module along with tcl. tk is not yet integrated in yocto so
>> we skip the check for this module. Avoid a warning by not adding this module to missing variable."
>> - I have included in my recipe: "python-core python-tkinter" which gave no error, but no tkinter installed and I have tried including "python-core python-modules" which gave me a
>> lot of python modules, but still no tkinter. (tried "from Tkinter import *" which gave an error and no tkinter in /usr/lib/python2.7)
>>
>> Do I manually need to install another package? Is it included or not? Do I need to do my own recipe?
>
> To answer my own question:
>
> Yes Tkinter is included in Python build but as the patch states it needs tcl as well as tk with tcl already included in Yocto and tk not.
>
> Andrei Gherzan wrote a .bb for OE-Core for tk version 8.5.11 which did work for me after bumping it to the latest version 8.6.1.
>
> If anybody needs it or wants to integrate it in Yocto here is the bb: (just remember to include tk and tcl in your build or add dependencies for them in python).
>
> http://pastebin.com/tRGk0U0c
Note: there was already a recipe for tk 8.6.0 in meta-oe (always a
good place to check for missing pieces before crafting your own)
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is Python Tkinter available for Yocto
2014-04-04 14:42 ` Gary Thomas
@ 2014-04-04 15:36 ` Jens Lucius
2014-04-04 16:35 ` Paul Barker
0 siblings, 1 reply; 6+ messages in thread
From: Jens Lucius @ 2014-04-04 15:36 UTC (permalink / raw)
To: Gary Thomas, yocto
Am 04.04.2014 16:42, schrieb Gary Thomas:
> On 2014-04-04 08:34, Jens Lucius wrote:
>>> I am a little bit confused if Python Tkinter is included as a package for python in the Yocto system.
>>>
>>> - There is a patch for python recipe called "avoid_warning_about_tkinter.patch" which states "_tkinter module needs tk module along with tcl. tk is not yet integrated in yocto so
>>> we skip the check for this module. Avoid a warning by not adding this module to missing variable."
>>> - I have included in my recipe: "python-core python-tkinter" which gave no error, but no tkinter installed and I have tried including "python-core python-modules" which gave me a
>>> lot of python modules, but still no tkinter. (tried "from Tkinter import *" which gave an error and no tkinter in /usr/lib/python2.7)
>>>
>>> Do I manually need to install another package? Is it included or not? Do I need to do my own recipe?
>> To answer my own question:
>>
>> Yes Tkinter is included in Python build but as the patch states it needs tcl as well as tk with tcl already included in Yocto and tk not.
>>
>> Andrei Gherzan wrote a .bb for OE-Core for tk version 8.5.11 which did work for me after bumping it to the latest version 8.6.1.
>>
>> If anybody needs it or wants to integrate it in Yocto here is the bb: (just remember to include tk and tcl in your build or add dependencies for them in python).
>>
>> http://pastebin.com/tRGk0U0c
> Note: there was already a recipe for tk 8.6.0 in meta-oe (always a
> good place to check for missing pieces before crafting your own)
>
Actually there is. Don´t know why I missed that. I just started with
yocto this week and still get confused where to best look for recipes.
There is the old openembedded, meta-oe, oe-core/meta, yocto and some are
floating around in other gits. Would be really nice to have one place to go.
But thanks again for pointing to the meta-oe where I will also look for
recipes in the future.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is Python Tkinter available for Yocto
2014-04-04 15:36 ` Jens Lucius
@ 2014-04-04 16:35 ` Paul Barker
0 siblings, 0 replies; 6+ messages in thread
From: Paul Barker @ 2014-04-04 16:35 UTC (permalink / raw)
To: Jens Lucius; +Cc: Yocto discussion list, Gary Thomas
On 4 April 2014 16:36, Jens Lucius <jenslucius@freenet.de> wrote:
> Am 04.04.2014 16:42, schrieb Gary Thomas:
>>
>> Note: there was already a recipe for tk 8.6.0 in meta-oe (always a
>> good place to check for missing pieces before crafting your own)
>>
> Actually there is. Don´t know why I missed that. I just started with yocto
> this week and still get confused where to best look for recipes. There is
> the old openembedded, meta-oe, oe-core/meta, yocto and some are floating
> around in other gits. Would be really nice to have one place to go.
>
> But thanks again for pointing to the meta-oe where I will also look for
> recipes in the future.
>
The best place to search is usually
http://layers.openembedded.org/layerindex/branch/master/recipes/
Just make sure you check the README for any layers you include to see
what else they depend on (e.g. some layers depend on the meta-oe
layer).
Recipes from the old openembedded repo usually need a bit of work to
bring them up to date, they're a good last resort before writing your
own recipe for something.
Cheers,
--
Paul Barker
Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Building python module after compiling in one recipe
2014-04-01 18:59 Is Python Tkinter available for Yocto Jens Lucius
2014-04-04 14:34 ` Jens Lucius
@ 2014-04-10 21:40 ` Jens Lucius
1 sibling, 0 replies; 6+ messages in thread
From: Jens Lucius @ 2014-04-10 21:40 UTC (permalink / raw)
To: yocto
Hi
I am trying to bitbake pjproject including the python module. I manged
to write a working .bb recipe for the latest pjproject, which compiles
and installes correctly. But I also want to build the python module.
The documentation of pjproject says about building the python module:
1. Build the PJSIP libraries first with the usual "./configure && make
dep && make" commands.
2. Go to pjsip-apps/src/python directory.
3. Run *'sudo python ./setup.py install'* or just *'sudo make'*
So I guess with the working recipe I got part 1. I tried to do stepts 2
and 3 by adding the following:
do_compile_append() {
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
export STAGING_LIBDIR
cd ${S}/pjsip-apps/src/python
oe_runmake
}
which starts the building process but then terminates with:
| cc1: warning: include location "/usr/include/python2.7" is unsafe for
cross-compilation [-Wpoison-system-directories]
| In file included from _pjsua.c:20:0:
| _pjsua.h:25:20: fatal error: Python.h: No such file or directory
So I guess it is trying to use the host python for building the module
(which is obviously not correct).
So can I build them both in one recipe and how? And if built correctly
how to install the modules?
Thanks for your help.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-04-10 21:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 18:59 Is Python Tkinter available for Yocto Jens Lucius
2014-04-04 14:34 ` Jens Lucius
2014-04-04 14:42 ` Gary Thomas
2014-04-04 15:36 ` Jens Lucius
2014-04-04 16:35 ` Paul Barker
2014-04-10 21:40 ` Building python module after compiling in one recipe Jens Lucius
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.