Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

beebox / crossover   deb

Repository URL to install this package:

Version: 18.5.0-1 

/ opt / cxoffice / lib / python / checkpython.py

# (c) Copyright 2013-2017. CodeWeavers, Inc.

"""
CrossOver is not compatible with Python 3 so try to find a more compatible
Python version to run it with.

See also checkgtk.py.
"""

import sys
if sys.version_info >= (3,):
    import os
    try:
        os.execvp('python2', ['python2'] + sys.argv)
    except OSError:
        from cxutils import cxgettext as _
        # For compatibility with Python 3, treat print as a function.
        # pylint: disable=C0325
        print(_("Could not find a suitable Python 2 interpreter. Will now try to install one."))

    # Getting the Python 2 GTK+ modules will automatically get us a suitable
    # Python 2 interpreter.
    import cxfixes
    cxfixes.add_error('gtk2')
    cxfixes.fix_errors()

    try:
        os.execvp('python2', ['python2'] + sys.argv)
    except OSError:
        cxfixes.report_errors()
        sys.exit(1)