* Python GObject Errors on yocto-2.1_M3.rc2
@ 2016-04-06 10:53 Chris Trobridge
2016-04-06 10:57 ` Burton, Ross
0 siblings, 1 reply; 11+ messages in thread
From: Chris Trobridge @ 2016-04-06 10:53 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
I have a code base using gobject introspection that has been running fine on Alex's gobject-introspection-experimental branch on poky-contrib but is broken on 2.1 M3.
I am using it with python3 (3.5) but it isn't accessible with python27 either. It appears it may be partially installed for 2.7 but not at all for 3.5.
To simplify things, I have built core-image-full-cmdline on genericx86-64 and this gives the same result as my image:
=============Poky (Yocto Project Reference Distro) 2.0+snapshot-20160406 genericx86-64 console
genericx86-64 login: rootroot@genericx86-64:~# pythonPython 2.7.11 (default, Apr 6 2016, 10:05:21) [GCC 5.3.0] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import giTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/gi/__init__.py", line 29, in <module> import importlibImportError: No module named importlib>>> =============
Is there something else I need to change to get gobject introspection to work with the RC or does this indicate a bug/omission?
Cheers,Chris
[-- Attachment #2: Type: text/html, Size: 2064 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-06 10:53 Python GObject Errors on yocto-2.1_M3.rc2 Chris Trobridge
@ 2016-04-06 10:57 ` Burton, Ross
2016-04-06 11:19 ` Chris Trobridge
0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2016-04-06 10:57 UTC (permalink / raw)
To: Chris Trobridge; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
On 6 April 2016 at 11:53, Chris Trobridge <christrobridge@hotmail.com>
wrote:
> ImportError: No module named importlib
>
Looks like python-gobject needs to depend on python-importlib. Not sure
why that isn't in -core to be honest.
Can you add python-importlib to your image and see if it then works, or if
other modules are missing?
Ross
[-- Attachment #2: Type: text/html, Size: 794 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-06 10:57 ` Burton, Ross
@ 2016-04-06 11:19 ` Chris Trobridge
2016-04-06 11:22 ` Burton, Ross
0 siblings, 1 reply; 11+ messages in thread
From: Chris Trobridge @ 2016-04-06 11:19 UTC (permalink / raw)
To: Burton, Ross; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
Thanks Ross,
This did the trick for python 2.7, and "from gi.repository import GObject" works too.
It's still not installed for python 3.5. I will see if I did anything specific to make that happen but it's odd that it worked before.
Regards,Chris
From: ross.burton@intel.com
Date: Wed, 6 Apr 2016 11:57:10 +0100
Subject: Re: [yocto] Python GObject Errors on yocto-2.1_M3.rc2
To: christrobridge@hotmail.com
CC: yocto@yoctoproject.org
On 6 April 2016 at 11:53, Chris Trobridge <christrobridge@hotmail.com> wrote:
ImportError: No module named importlib
Looks like python-gobject needs to depend on python-importlib. Not sure why that isn't in -core to be honest.
Can you add python-importlib to your image and see if it then works, or if other modules are missing?
Ross
[-- Attachment #2: Type: text/html, Size: 1610 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-06 11:19 ` Chris Trobridge
@ 2016-04-06 11:22 ` Burton, Ross
2016-04-06 15:45 ` Chris Trobridge
0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2016-04-06 11:22 UTC (permalink / raw)
To: Chris Trobridge; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
On 6 April 2016 at 12:19, Chris Trobridge <christrobridge@hotmail.com>
wrote:
> This did the trick for python 2.7, and "from gi.repository import GObject"
> works too.
>
Can you send a patch to add this dependency to the pygobject package?
Ross
[-- Attachment #2: Type: text/html, Size: 638 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-06 11:22 ` Burton, Ross
@ 2016-04-06 15:45 ` Chris Trobridge
2016-04-06 15:52 ` Burton, Ross
0 siblings, 1 reply; 11+ messages in thread
From: Chris Trobridge @ 2016-04-06 15:45 UTC (permalink / raw)
To: Burton, Ross; +Cc: yocto@yoctoproject.org
________________________________
> From: ross.burton@intel.com
> Date: Wed, 6 Apr 2016 12:22:39 +0100
> Subject: Re: [yocto] Python GObject Errors on yocto-2.1_M3.rc2
> To: christrobridge@hotmail.com
> CC: yocto@yoctoproject.org
>
>
> On 6 April 2016 at 12:19, Chris Trobridge
> <christrobridge@hotmail.com<mailto:christrobridge@hotmail.com>> wrote:
> This did the trick for python 2.7, and "from gi.repository import
> GObject" works too.
>
> Can you send a patch to add this dependency to the pygobject package?
>
> Ross
I will try to sort that out tomorrow (poky@yoctoproject.org, right?).
Regarding python3, whenever I change the "--with-python" option to something other than "python2.7" then I get an error.
If I specify python3.5 then the error is that the build cannot find python3.5. If I set it to python3.4 (which is installed on the host) then I get an error about system directory poisoning.
This suggests to me that the recipe seems to need both host and target python for this to work. It worked before so I will look tomorrow at the experimental branch and see what's different, if anything. I've deleted that branch here and it is gone from git.
Regards,
Chris
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-06 15:45 ` Chris Trobridge
@ 2016-04-06 15:52 ` Burton, Ross
2016-04-07 13:28 ` Alexander Kanavin
0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2016-04-06 15:52 UTC (permalink / raw)
To: Chris Trobridge; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
On 6 April 2016 at 16:45, Chris Trobridge <christrobridge@hotmail.com>
wrote:
> I will try to sort that out tomorrow (poky@yoctoproject.org, right?).
>
No, openembedded-core@lists.openembedded.org
Regarding python3, whenever I change the "--with-python" option to
> something other than "python2.7" then I get an error.
>
You need to change the inherits to pull in python3native. Sadly flipping
between py2 and py3 isn't trivial.
Ross
[-- Attachment #2: Type: text/html, Size: 1186 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-06 15:52 ` Burton, Ross
@ 2016-04-07 13:28 ` Alexander Kanavin
2016-04-07 13:35 ` Burton, Ross
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Kanavin @ 2016-04-07 13:28 UTC (permalink / raw)
To: yocto
On 04/06/2016 06:52 PM, Burton, Ross wrote:
> Regarding python3, whenever I change the "--with-python" option to
> something other than "python2.7" then I get an error.
>
>
> You need to change the inherits to pull in python3native. Sadly
> flipping between py2 and py3 isn't trivial.
I think 'git revert 7f7c9ab29eba0e58916629ca13dc4a494535ce19' should do
the trick, how come you don't remember writing it :)
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7f7c9ab29eba0e58916629ca13dc4a494535ce19
Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-07 13:28 ` Alexander Kanavin
@ 2016-04-07 13:35 ` Burton, Ross
2016-04-07 13:40 ` Alexander Kanavin
0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2016-04-07 13:35 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
On 7 April 2016 at 14:28, Alexander Kanavin <
alexander.kanavin@linux.intel.com> wrote:
> You need to change the inherits to pull in python3native. Sadly
>> flipping between py2 and py3 isn't trivial.
>>
>
> I think 'git revert 7f7c9ab29eba0e58916629ca13dc4a494535ce19' should do
> the trick, how come you don't remember writing it :)
>
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7f7c9ab29eba0e58916629ca13dc4a494535ce19
>
Yeah, that. :) Annoyingly it's not just a PACKAGECONFIG due to how
python-native works.
Ross
[-- Attachment #2: Type: text/html, Size: 1226 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-07 13:35 ` Burton, Ross
@ 2016-04-07 13:40 ` Alexander Kanavin
2016-04-07 16:58 ` Chris Trobridge
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Kanavin @ 2016-04-07 13:40 UTC (permalink / raw)
To: yocto@yoctoproject.org
On 04/07/2016 04:35 PM, Burton, Ross wrote:
> Yeah, that. :) Annoyingly it's not just a PACKAGECONFIG due to how
> python-native works.
Yeah, the annoying side effect is that every python thingy needs to be
packaged twice - not so visible in oe-core, but very visible in
meta-oe's meta-python:
http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python
Will be fixed by deprecating python 2, of course.
Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-07 13:40 ` Alexander Kanavin
@ 2016-04-07 16:58 ` Chris Trobridge
2016-04-08 12:16 ` Alexander Kanavin
0 siblings, 1 reply; 11+ messages in thread
From: Chris Trobridge @ 2016-04-07 16:58 UTC (permalink / raw)
To: Alexander Kanavin, yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
> To: yocto@yoctoproject.org
> From: alexander.kanavin@linux.intel.com
> Date: Thu, 7 Apr 2016 16:40:30 +0300
> Subject: Re: [yocto] Python GObject Errors on yocto-2.1_M3.rc2
>
> On 04/07/2016 04:35 PM, Burton, Ross wrote:
>
> > Yeah, that. :) Annoyingly it's not just a PACKAGECONFIG due to how
> > python-native works.
>
> Yeah, the annoying side effect is that every python thingy needs to be
> packaged twice - not so visible in oe-core, but very visible in
> meta-oe's meta-python:
>
> http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python
>
> Will be fixed by deprecating python 2, of course.
>
> Alex
Is there a shorter term solution that's generally applicable, like a separate python3-gobject recipe?
I've done something similar before but it had issues (produces duplicate output) that are hard to deal with satisfactorily.
At least this explains why my code stopped working.
Chris
[-- Attachment #2: Type: text/html, Size: 1405 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Python GObject Errors on yocto-2.1_M3.rc2
2016-04-07 16:58 ` Chris Trobridge
@ 2016-04-08 12:16 ` Alexander Kanavin
0 siblings, 0 replies; 11+ messages in thread
From: Alexander Kanavin @ 2016-04-08 12:16 UTC (permalink / raw)
To: yocto@yoctoproject.org
On 04/07/2016 07:58 PM, Chris Trobridge wrote:
> http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python
> >
> > Will be fixed by deprecating python 2, of course.
> >
> > Alex
>
> Is there a shorter term solution that's generally applicable, like a
> separate python3-gobject recipe?
In principle, yes - if you need to have pygobject both for 2 and 3 at
the same time, you can have two slightly different recipes; but I don't
know if it will work. You need to try and see.
Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-04-08 12:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-06 10:53 Python GObject Errors on yocto-2.1_M3.rc2 Chris Trobridge
2016-04-06 10:57 ` Burton, Ross
2016-04-06 11:19 ` Chris Trobridge
2016-04-06 11:22 ` Burton, Ross
2016-04-06 15:45 ` Chris Trobridge
2016-04-06 15:52 ` Burton, Ross
2016-04-07 13:28 ` Alexander Kanavin
2016-04-07 13:35 ` Burton, Ross
2016-04-07 13:40 ` Alexander Kanavin
2016-04-07 16:58 ` Chris Trobridge
2016-04-08 12:16 ` Alexander Kanavin
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.