From: Paul Brossier Date: Fri, 25 Sep 2009 23:04:44 +0000 (+0200) Subject: tests/python/localaubio.py: add some tricks to work with waf too X-Git-Tag: bzr2git~290 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a250b357b32e13946b632500c3e85905c54c7297;p=aubio.git tests/python/localaubio.py: add some tricks to work with waf too --- 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: