from __future__ import unicode_literals

import os

from mopidy import config, exceptions, ext

__version__ = '0.3.0'

class Extension(ext.Extension):

    dist_name = 'Mopidy-SomaFM'
    ext_name = 'somafm'
    version = __version__

    def get_default_config(self):
        conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf')
        return config.read(conf_file)

    def get_config_schema(self):
        schema = super(Extension, self).get_config_schema()
        return schema

    def validate_environment(self):
        try:
            import requests
        except ImportError as e:
            raise ExtensionError('Library requests not found', e)

    def get_backend_classes(self):
        from .actor import SomaFMBackend
        return [SomaFMBackend]

@@ -75,20 +75,8 @@
 fig,
- exceptions,
  ext
@@ -100,16 +100,17 @@
 0.3.0'%0A%0A
+%0A
 class Ex
@@ -482,185 +482,8 @@
 ma%0A%0A
-    def validate_environment(self):%0A        try:%0A            import requests%0A        except ImportError as e:%0A            raise ExtensionError('Library requests not found', e)%0A%0A
     

Remove dependency check done by Mopidy