Libtorrent Python

Building the libtorrent python bindings will produce a shared library (DLL)which is a python module that can be imported in a python program.

Files for rtorrent-python, version 0.2.9; Filename, size File type Python version Upload date Hashes; Filename, size rtorrentpython-0.2.9-py2.6.egg (52.1 kB) File type Egg Python version 2.6 Upload date Apr 11, 2012 Hashes View. Port details: py-libtorrent-rasterbar Python bindings for libtorrent-rasterbar 1.2.10 net-p2p =0 1.2.10 Version of this port present on the latest quarterly branch. Maintainer: yuri@FreeBSD.org Port Added: 2018-10-06 20:32:24 Last Update: 2020-12-28 23:02:15 SVN Revision: 559531 Also Listed In: python License: BSD3CLAUSE Description: The python binding of libtorrent, an open source C library.

building using boost build (windows)

Python

Download and install Visual C++ 2015 Build Tools

Download Boost libraries Extract it to c:/Libraries/boost_1_73_0 and create these environmental vars:

  1. BOOST_BUILD_PATH: 'c:/Libraries/boost_1_73_0/tools/build/'
  2. BOOST_ROOT: 'c:/Libraries/boost_1_73_0/'

Navigate to BOOST_ROOT, execute 'bootstrap.bat' and add to the path 'c:/Libraries/boost_1_73_0/'

Create a file user-config.jam in tour home directory and add this:

(change the python path for yours)

Navigate to bindings/python and execute::
python setup.py build --bjam

Note: If you are using 64 bits python you should edit setup.py and add this to the b2 command:address-model=64

Python

Top Python Libraries

This will create the file libtorrent.pyd inside build/lib/ that contains the binding.

building using boost build (others)

To set up your build environment, you need to add some settings to youruser-config.jam (in your home directory).

Declare the version(s) of python you have installed or want to use. Ifyou've installed python in a non-standard location, you have to add the prefixpath used when you installed python as a second option. Like this:

The bindings require at least python version 2.2.

For more information on how to install and set up boost-build, see thebuilding libtorrent section.

LibtorrentLibtorrent Python

Once you have boost-build set up, you cd to the bindings/pythondirectory and invoke b2 with the appropriate settings. For the availablebuild variants, see libtorrent build options.

Libtorrent Python 3

For example:

Libtorrent Python

Libtorrent Python Binding

This will produce a libtorrent python module in the current directory (filename extension depends on operating system). The libraries the python module dependson will be copied into ./dependencies.