Changeset 2172 for pjproject/trunk
- Timestamp:
- Jul 24, 2008 12:20:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/python/setup.py
r2120 r2172 1 # $Id:$ 2 # 3 # pjsua Setup script. 4 # 5 # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> 6 # 7 # This program is free software; you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation; either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # This program is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with this program; if not, write to the Free Software 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 # 1 21 from distutils.core import setup, Extension 2 22 import os 3 23 import sys 4 24 5 VERSION = "0.9.0" 25 # find pjsip version 26 pj_version="" 27 f = open('../../../pjlib/src/pj/config.c', 'r') 28 for line in f: 29 if line.find("PJ_VERSION") != -1: 30 pj_version= line.split(" = ")[1].strip('";\r\n') 31 break 32 f.close() 33 if pj_version=="": 34 print 'Unable to get PJ_VERSION' 35 sys.exit(1) 36 #print 'PJ_VERSION = "'+ pj_version + '"' 37 6 38 7 39 # Fill in pj_inc_dirs … … 9 41 f = os.popen("make -f helper.mak inc_dir") 10 42 for line in f: 11 43 pj_inc_dirs.append(line.rstrip("\r\n")) 12 44 f.close() 13 45 … … 16 48 f = os.popen("make -f helper.mak lib_dir") 17 49 for line in f: 18 50 pj_lib_dirs.append(line.rstrip("\r\n")) 19 51 f.close() 20 52 … … 23 55 f = os.popen("make -f helper.mak libs") 24 56 for line in f: 25 57 pj_libs.append(line.rstrip("\r\n")) 26 58 f.close() 27 59 28 60 # Mac OS X depedencies 29 61 if sys.platform == 'darwin': 30 31 62 extra_link_args = ["-framework", "CoreFoundation", 63 "-framework", "AudioToolbox"] 32 64 else: 33 65 extra_link_args = [] 34 66 35 67 36 setup(name="_pjsua", version=VERSION, 37 ext_modules = [ 38 Extension("_pjsua", 39 ["_pjsua.c"], 40 define_macros=[('PJ_AUTOCONF', '1'),], 41 include_dirs=pj_inc_dirs, 42 library_dirs=pj_lib_dirs, 43 libraries=pj_libs, 44 extra_link_args=extra_link_args), 45 ]) 46 47 setup(name="pjsua", version=VERSION, py_modules=["pjsua"]) 68 setup(name="pjsua", 69 version=pj_version, 70 description='SIP User Agent Library based on PJSIP', 71 url='http://trac.pjsip.org/repos/wiki/Python_SIP_Tutorial', 72 ext_modules = [Extension("_pjsua", 73 ["_pjsua.c"], 74 define_macros=[('PJ_AUTOCONF', '1'),], 75 include_dirs=pj_inc_dirs, 76 library_dirs=pj_lib_dirs, 77 libraries=pj_libs, 78 extra_link_args=extra_link_args 79 ) 80 ], 81 py_modules=["pjsua"] 82 ) 48 83 49 84
Note: See TracChangeset
for help on using the changeset viewer.