using setuptools for deluge

Suggestions and discussion of future versions
Post Reply
jorge.vargas
Member
Member
Posts: 14
Joined: Wed Jun 27, 2007 8:50 pm

using setuptools for deluge

Post by jorge.vargas »

Hi (last post for now)

I also experimented with moving over to setuptools, since the general benefits can be read on the web I'll stay with the specific for deluge.

After reading and undestanding your current setup.py it does 3 things

1- build libtorrent, all the code of OS and ARCH, plus the Extension distutil command
2- hack around the datafiles so it can read the glade, icons locale,etc. data files
3- "patch" distutils with more commands and run everything

what we'll win for moving to setuptools
for #1 nothing, setuptool tools support for extensions is as broken as distutils unless you are using pyrex which you aren't. But since eventually you are moving to the official python bindings this will be replaced.
for #2 setuptools has buildin suport for this, basically you put your datafiles inside your egg which will make the egg bigger but in the end they are supposed to be use by the egg so a relative path seems more logical, this will eliminate the need for replacing @datadir@
3- the build translation could be implemented outside of the setup.py and be feed to it by an entrypoint, although in my opinion this should just go out into the Makefile as it is a development tool not a packager/end-user thing.

What we'll win in general
- the most important will be "python setup.py develop" as this will allow you to have two or more in parallel deluge instalations (although I still need to review the .config code to make sure this is possible), but it will allow you to install deluge and test it without messing with the system.
- moving the "deluge" bin script into the lib and having a small wrapper be automatically generated, this means you could run deluge from the "build" directory so no need to install it to test development. just just make and launch.
- better release system as people can share around binaries build from the trunk that will even say from which svn rev they where taken.
- being compatible with the newest python packages, maybe even implement entry points for other packages.
- huge improvement on the windows port with the automatic installer
markybob
Compulsive Poster
Compulsive Poster
Posts: 1230
Joined: Thu May 24, 2007 11:27 pm
Location: Chicago, IL, USA
Contact:

Re: using setuptools for deluge

Post by markybob »

this sounds great to me. zach was working on using autotools, but that's stalled at best and distutils is a total POS. i'll have to look into this some more later. btw, you said you ported the current plugins system, but i didnt see an attached patch or url or anything. also, any chance you wanna do a setuptools for deluge patch? ;)
jorge.vargas
Member
Member
Posts: 14
Joined: Wed Jun 27, 2007 8:50 pm

Re: using setuptools for deluge

Post by jorge.vargas »

Post Reply