From 203af1c38b2840e8cb4248d5ae3773f5330d7195 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 21 Nov 2011 23:19:14 +0000 Subject: Gracefully deal with ancient Python lacking os.path.relpath. --- ext.wscript | 5 ++++- lv2/ns/lv2core/wscript | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ext.wscript b/ext.wscript index bfb3aad..b7af3f5 100644 --- a/ext.wscript +++ b/ext.wscript @@ -73,10 +73,13 @@ def should_build(ctx): def configure(conf): conf.env['EXPERIMENTAL'] = Options.options.experimental - if not should_build(conf): return + if not hasattr(os.path, 'relpath') and not Options.options.copy_headers: + conf.fatal( + 'os.path.relpath missing, get Python 2.6 or use --copy-headers') + autowaf.configure(conf) autowaf.display_header('LV2 %s Configuration' % info.NAME) conf.env['COPY_HEADERS'] = Options.options.copy_headers diff --git a/lv2/ns/lv2core/wscript b/lv2/ns/lv2core/wscript index a3533fd..f84e29a 100644 --- a/lv2/ns/lv2core/wscript +++ b/lv2/ns/lv2core/wscript @@ -27,6 +27,10 @@ def options(opt): help='Copy headers instead of linking to bundle') def configure(conf): + if not hasattr(os.path, 'relpath') and not Options.options.copy_headers: + conf.fatal( + 'os.path.relpath missing, get Python 2.6 or use --copy-headers') + conf.load('compiler_c') autowaf.configure(conf) -- cgit v1.2.1