Page 4 of 7

Re: Deluge.app - Native OS X Deluge Client

Posted: Sun Jun 27, 2010 4:50 pm
by frakk4d
Aha, looks like there might be issues with py2app & virtualenv:

http://zognot.org/20081219-2100-py2app-virtualenv

will do a bit more tinkering and see if I get anywhere

Update: I no longer get a 'python found' error trying to run the .app, but I get the following:

ImportError: dlopen(/Users/gellan/virtualenvs/delugeapp/lib/python2.6/lib-dynload/_AE.so, 2): no suitable image found. Did find:
/Users/gellan/virtualenvs/delugeapp/lib/python2.6/lib-dynload/_AE.so: mach-o, but wrong architecture

Judging by this post here: http://tippingpoint.mtheory.co.uk/post/ ... ow-leopard
it's something to do with i386/64bit incompatibility. No idea how I'd go about resolving that for the packages we're using though =/

doing otool -vh on the lib-dynload/_File.so gives:

/Users/gellan/virtualenvs/delugeapp/lib/python2.6/lib-dynload/_File.so:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 BUNDLE 10 1440 NOUNDEFS DYLDLINK TWOLEVEL

Pretty sure the cputype should read as i386. How would I go about building python2.6 and forcing it into i386 mode? If I can do that then I should (hopefully) be able to get one step closer to a launching Deluge.app

Any ideas?

Re: Deluge.app - Native OS X Deluge Client

Posted: Sun Jun 27, 2010 5:50 pm
by waeking
snow leopard comes with python 2.6 installed....

Here is an article on forcing i386
http://stackoverflow.com/questions/2584 ... -framework

Re: Deluge.app - Native OS X Deluge Client

Posted: Sun Jun 27, 2010 6:21 pm
by frakk4d
Yeah, I don't want to use the included Snow Leopard Python2.6 as the tutorial seems keen on using MacPorts' python 2.6 (with which I've actually got Deluge working, albeit in a launch-from-commandline fashion).

But yeah, I've managed to install a universal version of Python 2.6 which seems to have alleviated the incompatible architecture problems, but now I'm getting this error:

Code: Select all

Traceback (most recent call last):
  File "/Users/gellan/virtualenvs/delugeapp/src/deluge-1.2.3/dist/Deluge.app/Contents/Resources/__boot__.py", line 164, in <module>
    _run(('\x00\x00\x00\x00\x01(\x00\x02\x00\x00\x05MacHD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x15\xcd\\H+\x00\x00\x00\x1a0\xed\tDeluge.py\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a5y\xc7\xd4\x0e\xe0\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00I \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x08\x00\x00\xc8\x15\xbfL\x00\x00\x00\x11\x00\x08\x00\x00\xc7\xd4\x0e\xe0\x00\x00\x00\x0e\x00\x14\x00\t\x00D\x00e\x00l\x00u\x00g\x00e\x00.\x00p\x00y\x00\x0f\x00\x0c\x00\x05\x00M\x00a\x00c\x00H\x00D\x00\x12\x00=Users/gellan/virtualenvs/delugeapp/src/deluge-1.2.3/Deluge.py\x00\x00\x13\x00\x01/\x00\x00\x15\x00\x02\x00\r\xff\xff\x00\x00', '/Users/gellan/virtualenvs/delugeapp/src/deluge-1.2.3/Deluge.py'))
  File "/Users/gellan/virtualenvs/delugeapp/src/deluge-1.2.3/dist/Deluge.app/Contents/Resources/__boot__.py", line 160, in _run
    execfile(path, globals(), globals())
  File "/Users/gellan/virtualenvs/delugeapp/src/deluge-1.2.3/Deluge.py", line 29, in <module>
    from setuptools import setup, find_packages, Extension
  File "/Users/gellan/virtualenvs/delugeapp/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/__init__.py", line 2, in <module>
  File "/Users/gellan/virtualenvs/delugeapp/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/extension.py", line 2, in <module>
  File "/Users/gellan/virtualenvs/delugeapp/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/dist.py", line 5, in <module>
  File "/Users/gellan/virtualenvs/delugeapp/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/install.py", line 2, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/install.py", line 21, in <module>
    from site import USER_BASE
ImportError: cannot import name USER_BASE
2010-06-27 19:22:44.838 Deluge[51052:903] Deluge Error
2010-06-27 19:22:44.842 Deluge[51052:903] Deluge Error
An unexpected error has occurred during execution of the main script

ImportError: cannot import name USER_BASE

This is so tricky! Google isn't much help with this issue either... I understand that USER_BASE is the root directory for all Python installations (which I'd assume to be /Users/gellan/virtualenvs/delugeapp/lib/ in my case), but I've got no idea how to set it.

Also, I'm gonna repost this in a new thread, as this one seems to be for the 'official' Deluge.app implementation, whereas this'll be more of a hack-job.

Re: Deluge.app - Native OS X Deluge Client

Posted: Thu Oct 21, 2010 8:12 pm
by comedian
frakk4d wrote: This is so tricky! Google isn't much help with this issue either... I understand that USER_BASE is the root directory for all Python installations (which I'd assume to be /Users/gellan/virtualenvs/delugeapp/lib/ in my case), but I've got no idea how to set it.

Also, I'm gonna repost this in a new thread, as this one seems to be for the 'official' Deluge.app implementation, whereas this'll be more of a hack-job.
It should be as simple as issuing "export USER_BASE=/Users/gellan/virtualenvs/delugeapp/lib" from the terminal prompt.

If that doesn't work, you may want to try "export USER_BASE=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin"

Re: Deluge.app - Native OS X Deluge Client

Posted: Sun Jan 16, 2011 3:51 pm
by keepitcomplicated
I just started to work on a icon set for the different components of Deluge. Not too fancy yet, hope to make a better GTK icon, and of course a WebUI and Console icons as well.

Re: Deluge.app - Native OS X Deluge Client

Posted: Fri Jan 21, 2011 10:37 pm
by bcode
Go figure... while playing with the installed source and fiddling with py2app, I made this icon in preparation for packaging up the App. Something a little more OS X like.

@keepitcomplicated, I really like your deluged icon - perhaps we can make a mashup with this one?

Still banging my head against the wall, trying to figure out py2app - but the icon is done =).
Image

Re: Deluge.app - Native OS X Deluge Client

Posted: Fri Jan 21, 2011 10:41 pm
by macdelugeplease
So this means you're working on a native OS X client? How is it going?

Re: Deluge.app - Native OS X Deluge Client

Posted: Fri Jan 21, 2011 10:57 pm
by bcode
macdelugeplease wrote:So this means you're working on a native OS X client? How is it going?
About as well as the others, unfortunately... Stuck at the py2app stage. I can create a .app package, but it lacks all the necessary plugins to actually run. And there seems to be an issue with the setup.py that is being created.

If there is a decent python coder that would like to remote into my Mac and look at the situation, I'd be happy to loan the computer time.

Re: Deluge.app - Native OS X Deluge Client

Posted: Fri Jan 21, 2011 11:10 pm
by macdelugeplease
bcode wrote:About as well as the others, unfortunately... Stuck at the py2app stage. I can create a .app package, but it lacks all the necessary plugins to actually run. And there seems to be an issue with the setup.py that is being created.

If there is a decent python coder that would like to remote into my Mac and look at the situation, I'd be happy to loan the computer time.
I don't think there are any others. Zachtib was working on it but isn't any longer. Here is how far he got:

http://forum.deluge-torrent.org/viewtop ... 13&t=25915

I imagine you've already seen that, but in case you haven't. I hope this comes through. I would love a native OS X client.

Re: Deluge.app - Native OS X Deluge Client

Posted: Mon Jan 24, 2011 2:50 pm
by daenney
On a related topic, I've started to work on a "true" native Deluge app. Basically, since I've had to use python now for a few weeks and am starting to get the hang of it I figured I might as well go all the way and create a native UI for deluged through PyObjC. Remains to see if I can pull this off.

I hope that eventually this can become a good viable alternative to the gtkui offering a complete Mac experience and without the horseload of dependencies the gtkui has making packaging it such a pain. This will however be limited to talking to a deluged, it won't run one itself. I'll create a thread later on with the basic gist.

In the mean time, if I can assist with this port I'd be glad to, I'm already amazed you got this far, gtk-osx's jbuild had me stumped for about 2 weeks after which I just rage erased it from my system.