Changeset 4121 for pjproject/branches/1.x/pjsip-apps/src/python/setup.py
- Timestamp:
- May 14, 2012 10:42:56 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjsip-apps/src/python/setup.py
r3888 r4121 26 26 # find pjsip version 27 27 pj_version="" 28 f = open('../../../pjlib/src/pj/config.c', 'r') 28 pj_version_major="" 29 pj_version_minor="" 30 pj_version_rev="" 31 pj_version_suffix="" 32 f = open('../../../version.mak', 'r') 29 33 for line in f: 30 if line.find("PJ_VERSION") != -1: 31 pj_version= line.split(" = ")[1].strip('";\r\n') 32 break 34 if line.find("export PJ_VERSION_MAJOR") != -1: 35 tokens=line.split("=") 36 if len(tokens)>1: 37 pj_version_major= tokens[1].strip() 38 elif line.find("export PJ_VERSION_MINOR") != -1: 39 tokens=line.split("=") 40 if len(tokens)>1: 41 pj_version_minor= line.split("=")[1].strip() 42 elif line.find("export PJ_VERSION_REV") != -1: 43 tokens=line.split("=") 44 if len(tokens)>1: 45 pj_version_rev= line.split("=")[1].strip() 46 elif line.find("export PJ_VERSION_SUFFIX") != -1: 47 tokens=line.split("=") 48 if len(tokens)>1: 49 pj_version_suffix= line.split("=")[1].strip() 50 33 51 f.close() 34 if pj_version=="":35 print 'Unable to get PJ_VERSION '52 if not pj_version_major: 53 print 'Unable to get PJ_VERSION_MAJOR' 36 54 sys.exit(1) 55 56 pj_version = pj_version_major + "." + pj_version_minor 57 if pj_version_rev: 58 pj_version += "." + pj_version_rev 59 if pj_version_suffix: 60 pj_version += "-" + pj_version_suffix 61 37 62 #print 'PJ_VERSION = "'+ pj_version + '"' 38 63
Note: See TracChangeset
for help on using the changeset viewer.