~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.1.0/pjsip-apps/src/python/setup-vc.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: setup-vc.py 4122 2012-05-14 11:04:46Z bennylp $
 
2
#
 
3
# pjsua Setup script for Visual Studio
 
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
#
 
21
from distutils.core import setup, Extension
 
22
import os
 
23
import sys
 
24
 
 
25
# Find version
 
26
pj_version=""
 
27
pj_version_major=""
 
28
pj_version_minor=""
 
29
pj_version_rev=""
 
30
pj_version_suffix=""
 
31
f = open('../../../version.mak', 'r')
 
32
for line in f:
 
33
    if line.find("export PJ_VERSION_MAJOR") != -1:
 
34
        tokens=line.split("=")
 
35
        if len(tokens)>1:
 
36
                pj_version_major= tokens[1].strip()
 
37
    elif line.find("export PJ_VERSION_MINOR") != -1:
 
38
        tokens=line.split("=")
 
39
        if len(tokens)>1:
 
40
                pj_version_minor= line.split("=")[1].strip()
 
41
    elif line.find("export PJ_VERSION_REV") != -1:
 
42
        tokens=line.split("=")
 
43
        if len(tokens)>1:
 
44
                pj_version_rev= line.split("=")[1].strip()
 
45
    elif line.find("export PJ_VERSION_SUFFIX") != -1:
 
46
        tokens=line.split("=")
 
47
        if len(tokens)>1:
 
48
                pj_version_suffix= line.split("=")[1].strip()
 
49
 
 
50
f.close()
 
51
if not pj_version_major:
 
52
    print 'Unable to get PJ_VERSION_MAJOR'
 
53
    sys.exit(1)
 
54
 
 
55
pj_version = pj_version_major + "." + pj_version_minor
 
56
if pj_version_rev:
 
57
        pj_version += "." + pj_version_rev
 
58
if pj_version_suffix:
 
59
        pj_version += "-" + pj_version_suffix
 
60
 
 
61
#print 'PJ_VERSION = "'+ pj_version + '"'
 
62
 
 
63
 
 
64
# Check that extension has been built
 
65
if not os.access('../../lib/_pjsua.pyd', os.R_OK):
 
66
    print 'Error: file "../../lib/_pjsua.pyd" does not exist!'
 
67
    print ''
 
68
    print 'Please build the extension with Visual Studio first'
 
69
    print 'For more info, see http://trac.pjsip.org/repos/wiki/Python_SIP_Tutorial'
 
70
    sys.exit(1)
 
71
 
 
72
setup(name="pjsua",
 
73
      version=pj_version,
 
74
      description='SIP User Agent Library based on PJSIP',
 
75
      url='http://trac.pjsip.org/repos/wiki/Python_SIP_Tutorial',
 
76
      data_files=[('lib/site-packages', ['../../lib/_pjsua.pyd'])],
 
77
      py_modules=["pjsua"]
 
78
     )
 
79
 
 
80