From a250b357b32e13946b632500c3e85905c54c7297 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 26 Sep 2009 01:04:44 +0200 Subject: [PATCH] tests/python/localaubio.py: add some tricks to work with waf too --- tests/python/localaubio.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/python/localaubio.py b/tests/python/localaubio.py index 0eaac269..bf4488a0 100644 --- a/tests/python/localaubio.py +++ b/tests/python/localaubio.py @@ -8,10 +8,17 @@ except ImportError: try: import os import sys - cur_dir = os.path.dirname(sys.argv[0]) + cur_dir = os.path.dirname(__file__) sys.path.append(os.path.join(cur_dir,'..','..','python')) + # waf places sys.path.append(os.path.join(cur_dir,'..','..','python','aubio','.libs')) - from aubio.aubiowrapper import * + sys.path.append(os.path.join(cur_dir,'..','..','build', 'default', 'swig')) + # autotools places + sys.path.append(os.path.join(cur_dir,'..','..','build', 'default', 'python','aubio')) + try: + from aubiowrapper import * + except ImportError: + from aubio.aubiowrapper import * except ImportError: raise else: -- 2.26.2