diff options
-rwxr-xr-x | swig/python/lv2_list.py | 2 | ||||
-rw-r--r-- | swig/slv2.i | 6 | ||||
-rw-r--r-- | wscript | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/swig/python/lv2_list.py b/swig/python/lv2_list.py index ef99cf2..0cd6a1b 100755 --- a/swig/python/lv2_list.py +++ b/swig/python/lv2_list.py @@ -8,5 +8,5 @@ world.load_all() plugins = world.get_all_plugins() for i in plugins: - print(i.get_uri().as_uri()) + print(i.get_uri()) diff --git a/swig/slv2.i b/swig/slv2.i index 7d0c664..cb5279a 100644 --- a/swig/slv2.i +++ b/swig/slv2.i @@ -27,4 +27,10 @@ namespace SLV2 { return Iterator(self) %} }; +%extend Value { +%pythoncode %{ + def __str__(self): + return slv2_value_get_turtle_token(self.me) +%} +}; } @@ -241,13 +241,17 @@ def build(bld): if bld.env['SLV2_SWIG']: # Python Wrapper - bld( + obj = bld( features = 'cxx cxxshlib pyext', source = 'swig/slv2.i', target = 'swig/_slv2', + includes = ['..'], swig_flags = '-c++ -python -Wall -I.. -lslv2 -features autodoc=1', vnum = SLV2_LIB_VERSION, use = 'libslv2') + autowaf.use_lib(bld, obj, 'SLV2') + + bld.install_files('${PYTHONDIR}', 'swig/slv2.py') bld.add_post_fun(autowaf.run_ldconfig) |