~ubuntu-branches/ubuntu/precise/coherence/precise

« back to all changes in this revision

Viewing changes to coherence/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Charlie Smotherman
  • Date: 2010-01-02 10:57:15 UTC
  • mfrom: (1.1.7 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100102105715-sghzl2nw4lr5b1ob
Tags: 0.6.6.2-1
*  New  upstream release, summary of changes:
    - adding all necessary files to MANIFEST.in, to compensate for the
      gone 'auto-include-all-files-under-version-control' setuptools
      feature.
    - rearranging genre and genres attribute in DIDLLite - thx Caleb  
    - fix face_path typo, fixes #275.   

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import platform
 
2
import sys
2
3
 
3
 
__version_info__ = (0,6,4)
4
 
__version__ = '%d.%d.%d' % (__version_info__[0],__version_info__[1],__version_info__[2],)
 
4
__version_info__ = (0,6,6,2)
 
5
__version__ = '.'.join(map(str,__version_info__))
5
6
 
6
7
SERVER_ID = ','.join([platform.system(),
7
8
                      platform.release(),
8
9
                      'UPnP/1.0,Coherence UPnP framework',
9
10
                      __version__])
 
11
 
 
12
 
 
13
try:
 
14
    from twisted import version as twisted_version
 
15
    from twisted.web import version as twisted_web_version
 
16
    from twisted.python.versions import Version
 
17
except ImportError, exc:
 
18
    # log error to stderr, might be useful for debugging purpose
 
19
    sys.stderr.write("Twisted >= 2.5 and Twisted.Web >= 2.5 are required. "\
 
20
                     "Please install them.\n")
 
21
    raise
 
22
 
 
23
try:
 
24
    if twisted_version < Version("twisted", 2, 5, 0):
 
25
        raise ImportError("Twisted >= 2.5 is required. Please install it.")
 
26
 
 
27
    if twisted_web_version < Version("twisted.web", 2, 5, 0):
 
28
        raise ImportError("Twisted.Web >= 2.5 is required. Please install it")
 
29
except ImportError, exc:
 
30
    # log error to stderr, might be useful for debugging purpose
 
31
    for arg in exc.args:
 
32
        sys.stderr.write("%s\n" % arg)
 
33
    raise