wiki:Python_SIP/Build_Install

Version 1 (modified by bennylp, 16 years ago) (diff)

--

PJSUA Python Module

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

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.

Using Python build script:

  • Go to pjsip-apps/src/python directory.
  • Run 'python ./setup.py build'
  • The Python module will be placed in build directory inside current directory.
  • Alternatively run 'python ./setup.py install' to install both _pjsua and pjsua modules to Python's site_packages directory.