<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10970</bug_id>
          
          <creation_ts>2017-01-25 20:39:23 +0000</creation_ts>
          <short_desc>pybootchartgui.py has not been migrated to python3</short_desc>
          <delta_ts>2017-01-30 20:16:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>configuration</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Humberto Ibarra">humberto.ibarra.lopez</reporter>
          <assigned_to name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</assigned_to>
          <cc>brian.avery</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70158</commentid>
    <comment_count>0</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2017-01-25 20:39:23 +0000</bug_when>
    <thetext>Ran pyboothchartgui.py help expecting to get more info on the command, however I found myself with the following error:


[humberto@localhost build]$ ../scripts/pybootchartgui/pybootchartgui.py --help
Traceback (most recent call last):
  File &quot;../scripts/pybootchartgui/pybootchartgui.py&quot;, line 20, in &lt;module&gt;
    from pybootchartgui.main import main
  File &quot;/home/humberto/poky-meta-yocto/scripts/pybootchartgui/pybootchartgui/main.py&quot;, line 24, in &lt;module&gt;
    from . import batch
  File &quot;/home/humberto/poky-meta-yocto/scripts/pybootchartgui/pybootchartgui/batch.py&quot;, line 16, in &lt;module&gt;
    import cairo
ImportError: No module named cairo


It seems like this is caused because pybootchartgui hasn&apos;t been migrated to python3 yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70198</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-01-26 18:01:16 +0000</bug_when>
    <thetext>Humberto,

Do you have the cairo python module installed? I tried just the --help command and worked fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70237</commentid>
    <comment_count>2</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-01-27 21:16:46 +0000</bug_when>
    <thetext>help also worked for me on ubuntu 14.04. I do have cairo installed as a python module.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70259</commentid>
    <comment_count>3</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2017-01-30 17:15:43 +0000</bug_when>
    <thetext>I have python3-cairo installed, what I don&apos;t have is the pycairo package for python2. Am I supposed to install python2 cairo package for this to work? I thought we were fully on python3 already.

[humberto@localhost build]$ sudo dnf install python3-cairo
Last metadata expiration check: 0:01:29 ago on Mon Jan 30 11:14:47 2017.
Package python3-cairo-1.10.0-15.fc24.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[humberto@localhost build]$ sudo dnf install pycairo
Last metadata expiration check: 0:01:35 ago on Mon Jan 30 11:14:47 2017.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                              Arch                                            Version                                                Repository                                       Size
===================================================================================================================================================================================================================
Installing:
 pycairo                                              x86_64                                          1.10.0-4.fc24                                          fedora                                          481 k
 python-xpyb                                          x86_64                                          1.3.1-6.fc24                                           fedora                                          138 k

Transaction Summary
===================================================================================================================================================================================================================
Install  2 Packages

Total download size: 619 k
Installed size: 2.2 M
Is this ok [y/N]: N
Operation aborted.
[humberto@localhost build]$ python3
Python 3.5.1 (default, Sep 19 2016, 10:16:17) 
[GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import cairo
&gt;&gt;&gt; quit()
[humberto@localhost build]$ python
Python 2.7.12 (default, Sep 29 2016, 13:30:34) 
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux2
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import cairo
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
ImportError: No module named cairo
&gt;&gt;&gt; quit()
[humberto@localhost build]$ ../scripts/pybootchartgui/pybootchartgui.py -h
Traceback (most recent call last):
  File &quot;../scripts/pybootchartgui/pybootchartgui.py&quot;, line 20, in &lt;module&gt;
    from pybootchartgui.main import main
  File &quot;/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/main.py&quot;, line 24, in &lt;module&gt;
    from . import batch
  File &quot;/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/batch.py&quot;, line 16, in &lt;module&gt;
    import cairo
ImportError: No module named cairo
[humberto@localhost build]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70260</commentid>
    <comment_count>4</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-01-30 17:32:46 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I have python3-cairo installed, what I don&apos;t have is the pycairo package for
&gt; python2. Am I supposed to install python2 cairo package for this to work? I
&gt; thought we were fully on python3 already.
&gt; 
&gt; [humberto@localhost build]$ sudo dnf install python3-cairo
&gt; Last metadata expiration check: 0:01:29 ago on Mon Jan 30 11:14:47 2017.
&gt; Package python3-cairo-1.10.0-15.fc24.x86_64 is already installed, skipping.
&gt; Dependencies resolved.
&gt; Nothing to do.
&gt; Complete!
&gt; [humberto@localhost build]$ sudo dnf install pycairo
&gt; Last metadata expiration check: 0:01:35 ago on Mon Jan 30 11:14:47 2017.
&gt; Dependencies resolved.
&gt; =============================================================================
&gt; =============================================================================
&gt; =========================================================
&gt;  Package                                              Arch                  
&gt; Version                                                Repository           
&gt; Size
&gt; =============================================================================
&gt; =============================================================================
&gt; =========================================================
&gt; Installing:
&gt;  pycairo                                              x86_64                
&gt; 1.10.0-4.fc24                                          fedora               
&gt; 481 k
&gt;  python-xpyb                                          x86_64                
&gt; 1.3.1-6.fc24                                           fedora               
&gt; 138 k
&gt; 
&gt; Transaction Summary
&gt; =============================================================================
&gt; =============================================================================
&gt; =========================================================
&gt; Install  2 Packages
&gt; 
&gt; Total download size: 619 k
&gt; Installed size: 2.2 M
&gt; Is this ok [y/N]: N
&gt; Operation aborted.
&gt; [humberto@localhost build]$ python3
&gt; Python 3.5.1 (default, Sep 19 2016, 10:16:17) 
&gt; [GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux
&gt; Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt; &gt;&gt;&gt; import cairo
&gt; &gt;&gt;&gt; quit()
&gt; [humberto@localhost build]$ python
&gt; Python 2.7.12 (default, Sep 29 2016, 13:30:34) 
&gt; [GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux2
&gt; Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt; &gt;&gt;&gt; import cairo
&gt; Traceback (most recent call last):
&gt;   File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
&gt; ImportError: No module named cairo
&gt; &gt;&gt;&gt; quit()
&gt; [humberto@localhost build]$ ../scripts/pybootchartgui/pybootchartgui.py -h
&gt; Traceback (most recent call last):
&gt;   File &quot;../scripts/pybootchartgui/pybootchartgui.py&quot;, line 20, in &lt;module&gt;
&gt;     from pybootchartgui.main import main
&gt;   File
&gt; &quot;/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/main.py&quot;,
&gt; line 24, in &lt;module&gt;
&gt;     from . import batch
&gt;   File
&gt; &quot;/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/batch.py&quot;,
&gt; line 16, in &lt;module&gt;
&gt;     import cairo
&gt; ImportError: No module named cairo
&gt; [humberto@localhost build]$

the shebang (#!) indicates python, and most distros python point to python 2 so you try installing the module on the latter:


lsandov1@lsandov1-mobl2:~/poky$ which python
/usr/bin/python
lsandov1@lsandov1-mobl2:~/poky$ ls -la /usr/bin/python
lrwxrwxrwx 1 root root 9 Mar 16  2015 /usr/bin/python -&gt; python2.7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70261</commentid>
    <comment_count>5</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2017-01-30 18:07:03 +0000</bug_when>
    <thetext>So, is this script expected to work with python2 and its libraries and not python3? If so, is there a mention to this in the documentation?

I thought Mega-Manual marked Python3 as yocto dependency and python2 was added as an openembedded dependency. So, is this script part of openembedded? If this script is meant to be run with python2, I find it weird that I got this issue in the first place. Is cairo module not installed by default with python2? Not sure if the user is supposed to have or install this library on his own or if it should be mentioned in the manual as a dependency.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70268</commentid>
    <comment_count>6</comment_count>
    <who name="Humberto Ibarra">humberto.ibarra.lopez</who>
    <bug_when>2017-01-30 20:16:44 +0000</bug_when>
    <thetext>Leonardo told me that there was no place to put dependencies for the scripts in scripts/ folder. Closing this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>