Keep gobject check together with the other checks

This commit is contained in:
Stein Magnus Jodal 2014-09-09 08:35:18 +02:00
parent 2050385a5f
commit eb97b55d88
2 changed files with 18 additions and 16 deletions

View File

@ -2,6 +2,7 @@ from __future__ import unicode_literals
import platform
import sys
import textwrap
import warnings
from distutils.version import StrictVersion as SV
@ -19,6 +20,21 @@ if (isinstance(pykka.__version__, basestring)
'ERROR: Mopidy requires Pykka >= 1.1, < 2, but found %s.' %
pykka.__version__)
try:
import gobject # noqa
except ImportError:
print(textwrap.dedent("""
ERROR: The gobject Python package was not found.
Mopidy requires GStreamer (and GObject) to work. These are C libraries
with a number of dependencies themselves, and cannot be installed with
the regular Python tools like pip.
Please see http://docs.mopidy.com/en/latest/installation/ for
instructions on how to install the required dependencies.
"""))
raise
warnings.filterwarnings('ignore', 'could not open display')

View File

@ -4,23 +4,9 @@ import logging
import os
import signal
import sys
import textwrap
try:
import gobject
gobject.threads_init()
except ImportError:
print(textwrap.dedent("""
ERROR: The gobject Python package was not found.
Mopidy requires GStreamer (and GObject) to work. These are C libraries
with a number of dependencies themselves, and cannot be installed with
the regular Python tools like pip.
Please see http://docs.mopidy.com/en/latest/installation/ for
instructions on how to install the required dependencies.
"""))
raise
import gobject
gobject.threads_init()
try:
# Make GObject's mainloop the event loop for python-dbus