Keep gobject check together with the other checks
This commit is contained in:
parent
2050385a5f
commit
eb97b55d88
@ -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')
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user