Exemplo n.º 1
0
def get_versions(reporev=True):
    """Get version information for components used by Spyder"""
    import sys
    import platform
    # Hack to let IPython set QT_API, in case it's installed
    try:
        from IPython.external import qt
    except ImportError:
        pass
    import spyderlib.qt
    import spyderlib.qt.QtCore

    revision = None
    if reporev:
        from spyderlib.utils import vcs
        full, short, branch = vcs.get_hg_revision(os.path.dirname(__dir__))
        if full:
            revision = '%s:%s' % (full, short)

    if not sys.platform == 'darwin':  # To avoid a crash with our Mac app
        system = platform.system()
    else:
        system = 'Darwin'
    
    return {
        'spyder': __version__,
        'python': platform.python_version(),  # "2.7.3"
        'bitness': 64 if sys.maxsize > 2**32 else 32,
        'qt': spyderlib.qt.QtCore.__version__,
        'qt_api': spyderlib.qt.API_NAME,      # PySide or PyQt4
        'qt_api_ver': spyderlib.qt.__version__,
        'system': system,   # Linux, Windows, ...
        'revision': revision,  # '9fdf926eccce+:2430+'
    }
Exemplo n.º 2
0
def get_versions():
    """Get version information for components used by Spyder"""
    import sys
    import os.path as osp
    import platform
    import spyderlib
    from spyderlib.utils import vcs
    spyderpath = spyderlib.__path__[0]
    full, short, branch = vcs.get_hg_revision(osp.dirname(spyderpath))
    revision = None
    if full:
        revision = '%s:%s' % (full, short)
    if not sys.platform == 'darwin':  # To avoid a crash with our Mac app
        system = platform.system()
    else:
        system = 'Darwin'
    return {
        'spyder': spyderlib.__version__,
        'python': platform.python_version(),  # "2.7.3"
        'bitness': 64 if sys.maxsize > 2**32 else 32,
        'qt': spyderlib.qt.QtCore.__version__,
        'qt_api': spyderlib.qt.API_NAME,      # PySide or PyQt4
        'qt_api_ver': spyderlib.qt.__version__,
        'system': system,   # Linux, Windows, ...
        'revision': revision,  # '9fdf926eccce+:2430+'
    }
Exemplo n.º 3
0
def get_versions(reporev=True):
    """Get version information for components used by Spyder"""
    import sys
    import platform
    # Hack to let IPython set QT_API, in case it's installed
    try:
        from IPython.external import qt
    except ImportError:
        pass
    import spyderlib.qt
    import spyderlib.qt.QtCore

    revision = None
    if reporev:
        from spyderlib.utils import vcs
        full, short, branch = vcs.get_hg_revision(os.path.dirname(__dir__))
        if full:
            revision = '%s:%s' % (full, short)

    if not sys.platform == 'darwin':  # To avoid a crash with our Mac app
        system = platform.system()
    else:
        system = 'Darwin'

    return {
        'spyder': __version__,
        'python': platform.python_version(),  # "2.7.3"
        'bitness': 64 if sys.maxsize > 2**32 else 32,
        'qt': spyderlib.qt.QtCore.__version__,
        'qt_api': spyderlib.qt.API_NAME,  # PySide or PyQt4
        'qt_api_ver': spyderlib.qt.__version__,
        'system': system,  # Linux, Windows, ...
        'revision': revision,  # '9fdf926eccce+:2430+'
    }
Exemplo n.º 4
0
   if sys.excepthook.__name__ != 'apport_excepthook':
     print("WARNING: 3rd party Python exception hook is active: '%s'"
            % sys.excepthook.__name__)
   else:
     if not options.no_apport:
       print("WARNING: Ubuntu Apport exception hook is detected")
       print("         Use --no-apport option to disable it")
     else:
       sys.excepthook = sys.__excepthook__
       print("NOTICE: Ubuntu Apport exception hook is disabed")


# --- Continue

from spyderlib.utils.vcs import get_hg_revision
print("Revision %s:%s, Branch: %s" % get_hg_revision(DEVPATH))

sys.path.insert(0, DEVPATH)
print("01. Patched sys.path with %s" % DEVPATH)

EXTPATH = osp.join(DEVPATH, 'external-py' + sys.version[0])
if osp.isdir(EXTPATH):
    sys.path.insert(0, EXTPATH)
    print("                      and %s" % EXTPATH)


# Selecting the GUI toolkit: PySide if installed, otherwise PyQt4
# (Note: PyQt4 is still the officially supported GUI toolkit for Spyder)
if options.gui is None:
    try:
        import PySide  # analysis:ignore