From: Thomas Fillon Date: Fri, 16 May 2014 16:05:22 +0000 (+0200) Subject: Clean-up code for checking external librairies availability X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b0e61cd23f6e9f5c81f91616c3b37205b00f1271;p=timeside-diadems.git Clean-up code for checking external librairies availability - Enhance code to check if Aubio, Yaafe and Vamp host are available - Corresponding processors should not be shown in processors list - TimeSide can now be installed without all or any of these librairies - Tests ands Doctests will passed (for doctest I had to skip some new server sub-modules) --- diff --git a/timeside/analyzer/__init__.py b/timeside/analyzer/__init__.py index 062ee5c..e69de29 100644 --- a/timeside/analyzer/__init__.py +++ b/timeside/analyzer/__init__.py @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import - -# ----- Load external libraries ------ -# Aubio -try: - WITH_AUBIO = True - import aubio -except ImportError: - WITH_AUBIO = False -else: - del aubio - -# Yaafe -try: - WITH_YAAFE = True - import yaafelib -except ImportError: - WITH_YAAFE = False -else: - del yaafelib - -# Vamp Plugins -try: - from . vamp_plugin import VampSimpleHost - VampSimpleHost.SimpleHostProcess(['-v']) - WITH_VAMP = True -except OSError: - WITH_VAMP = False diff --git a/timeside/analyzer/limsi_sad.py b/timeside/analyzer/limsi_sad.py index 9044c52..df9603d 100644 --- a/timeside/analyzer/limsi_sad.py +++ b/timeside/analyzer/limsi_sad.py @@ -23,11 +23,8 @@ from timeside.core import implements, interfacedoc from timeside.analyzer.core import Analyzer from timeside.api import IAnalyzer import timeside -#from timeside.analyzer import WITH_YAAFE -WITH_YAAFE = True -if WITH_YAAFE: - from yaafe import Yaafe - import yaafelib + +import yaafelib import numpy as N import pickle import os.path