Version 5 (modified by bennylp, 16 years ago) (diff) |
---|
Build and Installation
TracNav
Getting the Module
The Python module source codes along with some samples are included in PJSIP distribution, in pjproject/pjsip-apps/src/python directory.
Building The Modules
Linux
Requirements
- Python: this normally should have been installed on every Linux.
- Python development package, to build the C extension. This might be called python-devel (e.g. on Fedora) or python2.4-dev (e.g. on Ubuntu).
Building the Module
Using Python build script:
- Build the PJSIP libraries first with the usual "./configure && make dep && make" commands.
- Go to pjsip-apps/src/python directory.
- Run 'sudo python ./setup.py install' or just 'sudo make'
Sample session:
$ cd your-pjsip-root-dir $ ./configure && make dep && make $ cd pjsip-apps/src/python $ sudo make
Microsoft Windows
Requirements
- Python SDK: I personally use ActivePython-2.4.3-12 distribution from ActiveState, since it has a matching debug package.
- Optional: debug package: the debug package is useful if you want to debug the C extension. You can download it from ftp://ftp.activestate.com/ActivePython/etc/
Building the Module with Visual Studio
Using Microsoft Visual Studio projects:
- Open pjsip-apps.dsw from pjsip-apps\build directory.
- Select python_pjsua project as the active project.
- Build the project
- The _pjsua.pyd Python module will be placed in pjsip-apps\lib directory.
- Copy _pjsua.pyd and pjsua.py from pjsip-apps\src\python directory to Python's site_packages directory (see Python manual for this), or alternatively add the directories where these files reside to your PYTHONPATH environment variable.