README.python.md 2.29 KB
Newer Older
1 2 3 4
# LIBLINPHONE PYTHON EXTENSION MODULE #

## BUILD PREREQUISITES

Ghislain MARY's avatar
Ghislain MARY committed
5 6
The common prerequisites listed in the README.md file are requested to build
the liblinphone Python extension module.
7
You will also need to install some additional tools needed during the build 
Ghislain MARY's avatar
Ghislain MARY committed
8 9 10 11
process. On linux, you can generally get them from your distribution. On Mac OS
X, you can get them from MacPorts or Brew. On Windows you will need to download
and install them manually. Here are these tools:
- A C and C++ compiler. On Windows you will need Visual Studio 2008 as it is
12
  the version used by Python.
Ghislain MARY's avatar
Ghislain MARY committed
13 14
- Python 2.7.x, with 'pip' command. On windows, add c:\Python27\Scripts in the
  PATH.
15 16 17 18 19 20 21 22 23 24 25 26
- Java
- awk (automatically installed when building on Windows)
- sed (automatically installed when building on Windows)
- patch (automatically installed when building on Windows)
- yasm (automatically installed when building on Windows)
- xxd (only for Linux and Mac OS X)
- pkg-config (automatically installed when building on Windows)
- intltoolize (automatically installed when building on Windows)
- doxygen
- dot (graphviz)
- pystache (install with pip install pystache in terminal)
- wheel (install with pip install wheel in terminal)
Ghislain MARY's avatar
Ghislain MARY committed
27 28
- MinGw (only on Windows): Follow the instructions at
  http://mingw.org/wiki/Getting_Started
29 30 31 32 33 34 35

On windows, append the following to your PATH if not the case:
    C:\Program Files (x86)\GnuWin32\bin
    C:\MinGW\bin
    C:\Python27\Scripts
    C:\Program Files (x86)\Graphviz2.38

Ghislain MARY's avatar
Ghislain MARY committed
36
Once done, within the system's shell (unix terminal, windows cmd), place into
37 38 39 40
the root of linphone-cmake-builder project and run the following commands:

## BUILDING THE SDK ON LINUX AND MAC OS X

Ghislain MARY's avatar
Ghislain MARY committed
41 42
	$ ./prepare.py python
	$ make -C WORK/python/cmake
43 44

If everything is successful (and after a few minutes) you will find the Python
Ghislain MARY's avatar
Ghislain MARY committed
45 46
wheel package of the liblinphone Python extension module in the OUTPUT
directory.
47 48 49

## BUILDING THE SDK ON WINDOWS

Ghislain MARY's avatar
Ghislain MARY committed
50 51
Run the following command in Windows command prompt after having setup the
build prerequisites:
52

Ghislain MARY's avatar
Ghislain MARY committed
53 54 55 56
	> python prepare.py python

Then open the WORK\python\cmake\Project.sln Visual Studio solution and build
using the Release configuration.
57 58 59 60

If everything is successful (and after a few minutes) you will find the Python
wheel package and installers of the liblinphone Python extension module in the
OUTPUT directory.