{{{ #!html

Installing Deluge From Source

}}} [[PageOutline(1-4,,inline)]] = Download Source = You can either get the source from a tarball on our [http://download.deluge-torrent.org/source/?C=M;O=D ftp] or from our GitRepo. == Dependencies == Deluge has a number of dependencies that are required for it to run properly. Most of them are runtime only deps, but a few are required for successfully building Deluge. Along with the following packages, you will also need to install the appropriate build tools provided by your OS. [[Include(source:DEPENDS, text/x-trac-wiki)]] == Debian/Ubuntu Dependencies == Apt-get line to install all above dependencies: {{{ sudo apt-get install python python-twisted python-twisted-web2 python-openssl python-simplejson python-setuptools gettext intltool python-xdg python-chardet python-geoip python-libtorrent python-notify python-pygame python-gtk2 python-gtk2-dev librsvg2-dev xdg-utils python-mako }}} == Windows Dependencies == Make sure all Python dependencies are '''py2.6''' and '''win32''' (32-bit) versions. * '''[http://code.google.com/p/libtorrent/downloads/list python-libtorrent]''' * '''[http://www.python.org/download/ Python 2.6]''' ([http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi python-2.6.6.msi]) * Building Deluge will be easier if you add your Python directory to your [https://www.java.com/en/download/help/path.xml system PATH] variable after installation. Remember to separate directory names with semicolons (;) in the variable. * '''[http://pypi.python.org/pypi/setuptools SetupTools]''' ([http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11.win32-py2.6.exe#md5=1509752c3c2e64b5d0f9589aafe053dc setuptools-0.6c11.win32-py2.6.exe]) * '''[http://pygame.org/download.shtml PyGame]''' ([http://pygame.org/ftp/pygame-1.9.1.win32-py2.6.msi pygame-1.9.1.win32-py2.6.msi]) * '''[http://www.pygtk.org/downloads.html PyGTK]''' ([http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.0.win32-py2.6.msi pygtk-all-in-one-2.24.0.win32-py2.6.msi]) * '''[http://pypi.python.org/pypi/pyOpenSSL PyOpenSSL]''' ([http://pypi.python.org/packages/2.6/p/pyOpenSSL/pyOpenSSL-0.13.winxp32-py2.6.msi#md5=1646faad52bcbdb56c81435a51e99bf5 pyOpenSSL-0.13.winxp32-py2.6.msi]) * '''[http://www.slproweb.com/products/Win32OpenSSL.html OpenSSL]''' ([http://www.slproweb.com/download/Win32OpenSSL_Light-0_9_8r.exe Win32OpenSSL_Light-0_9_8r.exe]) * '''[http://sourceforge.net/projects/pywin32/ Py Win Extensions]''' ([http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win32-py2.6.exe/download pywin32-216.win32-py2.6.exe]) * '''[http://pypi.python.org/pypi/Twisted Twisted 11]''' ([http://pypi.python.org/packages/2.6/T/Twisted/Twisted-11.0.0.winxp32-py2.6.msi#md5=b3f1f194c9256c5e9ce362d0cf2a6036 Twisted-11.0.0.winxp32-py2.6.msi]) The following packages do not have Windows installers, instead install them using python ''easy_install'', see command below: * '''[http://www.freedesktop.org/wiki/Software/pyxdg PyXDG]''' * '''[http://pypi.python.org/pypi/zope.interface Zope Interface]''' * '''[http://pypi.python.org/pypi/Mako Mako]''' * '''[http://pypi.python.org/pypi/chardet Chardet]''' After ''Python'' and ''Setuptools'' are installed, open a console and run: {{{ C:\Python26\Scripts\easy_install.exe zope.interface chardet mako pyxdg }}} ---- = Building and Installing = The first step you should do is make sure you have a clean build environment. {{{ python setup.py clean -a }}} Now the build: {{{ python setup.py build }}} And finally, install the package to your system: {{{ sudo python setup.py install }}} ''Note: For Windows users omit `sudo` command'' For Linux Desktop systems an extra step is required due to an installer [http://dev.deluge-torrent.org/ticket/1389 bug] not copying data files, such as `deluge.desktop`: {{{ sudo python setup.py install_data }}} == Developer Install == Installing Deluge with develop mode creates binaries that link back to the source code so changes will be reflected immediately thus no need to repeatedly install. {{{ python setup.py develop }}} If you wish to use a specific development directory, the following will create a Deluge install in ~/delugeDev: {{{ export PYTHONPATH=${HOME}/delugeDev python setup.py develop --install-dir ~/delugeDev }}} Another alternative for a separate Deluge development environment is to use python [http://pypi.python.org/pypi/virtualenv virtualenv] = Removing From System = In the unlikely event you want to remove a copy of Deluge installed by the previous method, you will have to manually delete the Deluge related files on your system. For the most part you can simply delete deluge related files in your site-packages folder. Example: {{{ sudo rm -r /usr/lib/python2.5/site-packages/deluge* }}} There will still be some files located in /usr/share that you can hunt down and delete if you wish to.