Changes between Version 5 and Version 6 of Python_SIP/Build_Install
- Timestamp:
- Jul 24, 2008 12:38:49 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Python_SIP/Build_Install
v5 v6 3 3 [[TracNav(Python_SIP/TOC)]] 4 4 5 == Getting the Module == #getting5 == Getting the Modules == #getting 6 6 7 The Python module source codes along with some samples are included in PJSIP distribution, in [source:pjproject/trunk/pjsip-apps/src/python pjproject/pjsip-apps/src/python] directory. 7 Currently we only distribute source codes and not binaries. 8 9 The Python modules source codes along with some samples are included in PJSIP distribution, in [source:pjproject/trunk/pjsip-apps/src/python pjproject/pjsip-apps/src/python] directory. No separate download is needed. 8 10 9 11 [[BR]] 10 12 11 == Building The Modules == #build13 == Building The Modules From the Source == #build 12 14 === Linux === 13 15 ==== Requirements ==== … … 38 40 39 41 1. '''Python SDK''': I personally use [ftp://ftp.activestate.com/ActivePython/windows/2.4/ ActivePython-2.4.3-12] distribution from [http://www.activestate.com ActiveState], since it has a matching debug package. 42 1. '''Visual Studio''': for building the C extension. 40 43 1. '''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/ 41 44 42 45 ==== Building the Module with Visual Studio ==== 43 Using Microsoft Visual Studio projects: 46 47 '''Step 1: Building the C Extension''': 44 48 1. Open '''pjsip-apps.dsw''' from {{{pjsip-apps\build}}} directory. 45 49 1. Select '''python_pjsua''' project as the active project. 46 50 1. Build the project 47 51 1. The {{{_pjsua.pyd}}} Python module will be placed in {{{pjsip-apps\lib}}} directory. 48 1. 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.49 52 53 '''Step 2: Installing the Modules''': 54 1. Open ''Command Prompt'' 55 1. Go to '''{{{pjsip-apps\src\python}}}''' directory 56 1. Run '''{{{python setup-vc.py install}}}''' (note that the installation script is {{{setup-vc.py}}} and not {{{setup.py}}}). 57 58 Sample session: 59 60 {{{ 61 C:> cd your-pjsip-root-directory 62 C:> cd pjsip-apps\src\python 63 C:> python setup-vc.py install 64 }}} 65 66 === Building the Module with MinGW === 67 68 Adamczak Krzysztof suggested this on PJSIP mailing list to build the extensions with MinGW: 69 70 {{{ 71 python setup.py build_ext --compiler=mingw32 install 72 }}} 73 74 75 === Common Problems === 76 77 ==== Cannot open include file: 'Python.h ==== 78 79 You're missing Python SDK. 80