allow everride of python executable, default to the one used by waf
This commit is contained in:
parent
0cce364e6f
commit
43fec8a798
3
lv2_ui.c
3
lv2_ui.c
|
@ -68,6 +68,7 @@
|
|||
#include <lv2.h>
|
||||
#include "lv2_ui.h"
|
||||
#include "lv2_external_ui.h"
|
||||
#include "config.h"
|
||||
|
||||
struct control
|
||||
{
|
||||
|
@ -403,7 +404,7 @@ instantiate(
|
|||
|
||||
control_ptr->pid = -1;
|
||||
|
||||
argv[0] = "python";
|
||||
argv[0] = PYTHON;
|
||||
argv[1] = filename;
|
||||
argv[2] = plugin_uri;
|
||||
argv[3] = bundle_path;
|
||||
|
|
9
wscript
9
wscript
|
@ -5,6 +5,10 @@
|
|||
# LIBRARIES = -DPIC -Wall
|
||||
# CFLAGS := -g -fPIC -DPIC -Wall -Werror
|
||||
|
||||
import sys
|
||||
import Params
|
||||
import lv2plugin
|
||||
|
||||
# the following two variables are used by the target "waf dist"
|
||||
VERSION='2.0'
|
||||
APPNAME='lv2fil'
|
||||
|
@ -15,6 +19,7 @@ blddir = 'build'
|
|||
|
||||
def set_options(opt):
|
||||
opt.parser.remove_option('--prefix') # prefix as commonly used concept has no use here, so we remove it to not add confusion
|
||||
opt.add_option('--python', type='string', default=sys.executable, dest='PYTHON', help='Path to python executable.')
|
||||
opt.tool_options('compiler_cc')
|
||||
opt.tool_options('lv2plugin', tooldir='.')
|
||||
|
||||
|
@ -26,6 +31,10 @@ def configure(conf):
|
|||
conf.check_pkg('lv2', mandatory=True, destvar='LV2CORE')
|
||||
|
||||
conf.env.append_unique('LINKFLAGS', '-lm')
|
||||
conf.env['PYTHON'] = getattr(Params.g_options, 'PYTHON')
|
||||
conf.define('PYTHON', conf.env['PYTHON'])
|
||||
conf.write_config_header('config.h')
|
||||
lv2plugin.display_msg('Python executable', conf.env['PYTHON'], 'GREEN')
|
||||
|
||||
def build(bld):
|
||||
filter = bld.create_obj('lv2plugin', type='cc')
|
||||
|
|
Loading…
Reference in New Issue