summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-05 02:23:25 -0400
committerDavid Robillard <d@drobilla.net>2016-09-05 02:23:25 -0400
commitc9a93f83de23c657e40b5f689c9faaa3b3c8828d (patch)
treed82e18e54f04e94fc07f9bfdaf32b8fd71cd6c9d /wscript
parent5be277f5d9d2bbfa58028fb7522da4781450d6c4 (diff)
downloadlilv-c9a93f83de23c657e40b5f689c9faaa3b3c8828d.tar.gz
lilv-c9a93f83de23c657e40b5f689c9faaa3b3c8828d.tar.bz2
lilv-c9a93f83de23c657e40b5f689c9faaa3b3c8828d.zip
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.
Diffstat (limited to 'wscript')
-rw-r--r--wscript16
1 files changed, 3 insertions, 13 deletions
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', '')