You are not logged in.

#1 2011-05-03 17:34:29

CaptainKirk
Member
Registered: 2009-06-07
Posts: 347

[solved] Can't Compile Hamster (Python app)

After the Gnome 3 upgrade, I no longer have my beloved hamster applet. sad

To note, I actually run Xfce and I was using the xfce4-xfapplet-plugin to run the Gnome hamster applet. Now it's gone, however. But there is here: http://www.janhouse.lv/blog/linux/hamst … stem-tray/ a solution! For Arch even! smile

However I am having problems compiling. sad

Firstly I had to change all occurrences of 0775 to 775 in /tmp/hamster-applet/wscript to avoid getting a "SyntaxError: invalid token" from Python. But now that I fixed that, it still won't run. Here is what I get:

[hamster-applet]$ ./waf configure build --prefix=/usr
Checking for program python              : /usr/bin/python 
Checking for Python version >= 2.4.2     : ok 3.2.0 
Checking for program glib-genmarshal     : /usr/bin/glib-genmarshal 
Checking for program glib-mkenums        : /usr/bin/glib-mkenums 
Checking for program dbus-binding-tool   : /usr/bin/dbus-binding-tool 
Checking for program docbook2man         : not found 
Checking for program xml2po              : /usr/bin/xml2po 
Checking for program xsltproc            : /usr/bin/xsltproc 
Checking for program msgfmt              : /usr/bin/msgfmt 
Checking for program intltool-merge      : /usr/bin/intltool-merge 
Checking for gnome-keybindings variables : yes 
/tmp/hamster-applet/help/wscript: error: Traceback (most recent call last):
  File "/tmp/hamster-applet/.waf3-1.5.17-59000d9a8fd915f99be7dcd7409a0462/wafadmin/Utils.py", line 445, in recurse
    txt=readf(file_path,m='rU')
  File "/tmp/hamster-applet/.waf3-1.5.17-59000d9a8fd915f99be7dcd7409a0462/wafadmin/Utils.py", line 408, in readf
    f=open(fname,m)
IOError: [Errno 2] No such file or directory: '/tmp/hamster-applet/wscript_configure'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/hamster-applet/.waf3-1.5.17-59000d9a8fd915f99be7dcd7409a0462/wafadmin/Utils.py", line 445, in recurse
    txt=readf(file_path,m='rU')
  File "/tmp/hamster-applet/.waf3-1.5.17-59000d9a8fd915f99be7dcd7409a0462/wafadmin/Utils.py", line 408, in readf
    f=open(fname,m)
IOError: [Errno 2] No such file or directory: '/tmp/hamster-applet/help/wscript_configure'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/hamster-applet/.waf3-1.5.17-59000d9a8fd915f99be7dcd7409a0462/wafadmin/Utils.py", line 198, in load_module
    exec(compile(code,file_path,'exec'),module.__dict__)
  File "/tmp/hamster-applet/help/wscript", line 26
    print "Missing DOC variable declarations in %s:" % (mf_am.abspath())
                                                   ^
SyntaxError: invalid syntax

Any ideas about this?

Thanks.

Last edited by CaptainKirk (2011-05-03 18:57:43)

Offline

#2 2011-05-03 17:45:56

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [solved] Can't Compile Hamster (Python app)

Use python 2 not python 3 (call waf with python2)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2011-05-03 17:51:01

CaptainKirk
Member
Registered: 2009-06-07
Posts: 347

Re: [solved] Can't Compile Hamster (Python app)

Thanks for the reply. I had tried that before. Here I removed 3 and use 2 and get a different error:

[kirk@arch ~]$ sudo pacman -Rsn python
Password: 
checking dependencies...

Remove (1): python-3.2-2

Total Removed Size:   69.45 MB

Do you want to remove these packages? [Y/n] 
(1/1) removing python                              [######################] 100%
[kirk@arch ~]$ sudo pacman -S python2
warning: python2-2.7.1-9 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): python2-2.7.1-9

Total Download Size:    0.00 MB
Total Installed Size:   62.66 MB

Proceed with installation? [Y/n] 
(1/1) checking package integrity                   [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
c(1/1) upgrading python2                            [#############---------]  63d (1/1) upgrading python2                            [##################----]  8/(1/1) upgrading python2                            [#####################-]  98(1/1) upgrading python2                            [######################] 100%
[kirk@arch ~]$ cd /tmp
[kirk@arch tmp]$ cd hamster-applet
[kirk@arch hamster-applet]$ ./waf configure build --prefix=/usr
/usr/bin/env: python: No such file or directory

Offline

#4 2011-05-03 18:42:30

CaptainKirk
Member
Registered: 2009-06-07
Posts: 347

Re: [solved] Can't Compile Hamster (Python app)

Answer is:

sudo cp /usr/bin/python2 /usr/bin/python

Thanks!

Offline

#5 2011-05-03 19:20:22

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 211

Re: [solved] Can't Compile Hamster (Python app)

This will potentially create problems to your installation. For example if you uninstall python2 the /usr/bin/python file will be left there. Or if you want to install python 3 the installation will fail since the /usr/bin/python file will already be present. The correct solution is to run

python2 ./waf configure build

Offline

#6 2011-05-04 09:41:28

CaptainKirk
Member
Registered: 2009-06-07
Posts: 347

Re: [solved] Can't Compile Hamster (Python app)

Good point. I put it back. Thanks

EDIT: Well to actually run the thing as per http://www.janhouse.lv/blog/linux/hamst … stem-tray/ I had to put python back. For now it works anyhow. smile

Thanks

Last edited by CaptainKirk (2011-05-04 09:55:33)

Offline

Board footer

Powered by FluxBB