Changes between Version 5 and Version 6 of Python_SIP/Build_Install


Ignore:
Timestamp:
Jul 24, 2008 12:38:49 PM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python_SIP/Build_Install

    v5 v6  
    33[[TracNav(Python_SIP/TOC)]] 
    44 
    5 == Getting the Module == #getting 
     5== Getting the Modules == #getting 
    66 
    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. 
     7Currently we only distribute source codes and not binaries. 
     8 
     9The 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. 
    810 
    911[[BR]] 
    1012 
    11 == Building The Modules == #build 
     13== Building The Modules From the Source == #build 
    1214=== Linux === 
    1315==== Requirements ==== 
     
    3840 
    3941 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. 
    4043 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/ 
    4144 
    4245==== Building the Module with Visual Studio ==== 
    43 Using Microsoft Visual Studio projects: 
     46 
     47'''Step 1: Building the C Extension''': 
    4448 1. Open '''pjsip-apps.dsw''' from {{{pjsip-apps\build}}} directory. 
    4549 1. Select '''python_pjsua''' project as the active project. 
    4650 1. Build the project 
    4751 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. 
    4952 
     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 
     68Adamczak 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 
     79You're missing Python SDK. 
     80