From c9a93f83de23c657e40b5f689c9faaa3b3c8828d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 Sep 2016 02:23:25 -0400 Subject: Add new hand-crafted Python bindings New bindings are Pythonic, supporting iteration, DWIM type conversion, pretty printing, and so on, where possible. Updated test suite covers 100% of binding code. Which is to say: add real Python bindings. As far as the Lilv API itself is concerned, you can do everything via Python. However, more work is needed to make fancy wrappers for parts of LV2 itself (MIDI, URI map, etc) to be able to run advanced plugins. --- wscript | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 6f2aac1..a2eb45b 100644 --- a/wscript +++ b/wscript @@ -64,7 +64,6 @@ def configure(conf): if Options.options.bindings: try: - conf.load('swig') conf.load('python') conf.load('compiler_cxx') conf.check_python_headers() @@ -352,7 +351,7 @@ def build(bld): if bld.is_defined('LILV_PYTHON'): # Copy Python unittest files - for i in [ 'test_api.py', 'test_api_mm.py' ]: + for i in [ 'test_api.py' ]: bld(features = 'subst', is_copy = True, source = 'bindings/test/python/' + i, @@ -413,16 +412,7 @@ def build(bld): if bld.is_defined('LILV_PYTHON'): # Python Wrapper - obj = bld(features = 'cxx cxxshlib pyext', - source = 'bindings/lilv.i', - target = 'bindings/_lilv', - includes = ['..'], - swig_flags = '-c++ -python %s -Wall -I.. -llilv -features autodoc=1' % - ("-py3" if sys.version_info >= (3,0,0) else ""), - use = 'liblilv') - autowaf.use_lib(bld, obj, 'LILV') - - bld.install_files('${PYTHONDIR}', bld.path.ant_glob('bindings/lilv.py')) + bld.install_files('${PYTHONDIR}', 'bindings/python/lilv.py') bld.add_post_fun(autowaf.run_ldconfig) if bld.env.DOCS: @@ -444,7 +434,7 @@ def test(ctx): autowaf.pre_test(ctx, APPNAME) if ctx.is_defined('LILV_PYTHON'): os.environ['LD_LIBRARY_PATH'] = os.getcwd() - autowaf.run_tests(ctx, 'Python ' + APPNAME, ['python -m unittest discover bindings/']) + autowaf.run_tests(ctx, APPNAME, ['python -m unittest discover bindings/']) os.environ['PATH'] = 'test' + os.pathsep + os.getenv('PATH') Logs.pprint('GREEN', '') -- cgit v1.2.1