From a3639efe18632ae40519e36f0cd844feacba18ac Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Thu, 7 Jun 2007 11:38:45 +0100 Subject: [PATCH] win32 build fixes --- examples/wscript | 5 +++-- tests/wscript | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/wscript b/examples/wscript index d3c8c36..4295920 100644 --- a/examples/wscript +++ b/examples/wscript @@ -8,8 +8,9 @@ import Task def build(bld): bindgen = bld.create_obj('command-output') bindgen.stdout = 'foomodule.cc' - bindgen.stdin = 'foomodulegen.py' - bindgen.command = 'foomodulegen.py' + bindgen.argv = [bindgen.input_file('foomodulegen.py')] + bindgen.command = 'python' + bindgen.command_is_external = True bindgen.prio = 3 # must run after the 'py' objects in ../pybindgen obj = bld.create_obj('cpp', 'shlib', 'pyext') diff --git a/tests/wscript b/tests/wscript index e6f1b46..ec3b890 100644 --- a/tests/wscript +++ b/tests/wscript @@ -7,17 +7,20 @@ import pproc as subprocess def build(bld): + top_srcdir = bld.m_srcnode.abspath() + gen = bld.create_obj('command-output') gen.command = 'test-generation.py' gen.stdout = 'test.cc' - gen.stdin = 'test-generation.py' - top_srcdir = bld.m_srcnode.abspath() - gen.argv = [top_srcdir] + gen.argv = [gen.input_file('test-generation.py'), top_srcdir] + gen.command = 'python' + gen.command_is_external = True gen.prio = 5 obj = bld.create_obj('cpp', 'objects', 'pyext') obj.source = 'test.cc' - obj.env.append_value('CXXFLAGS', ['-Wall', '-Werror', '-Wno-unused']) + if os.path.basename(obj.env['CXX']).startswith("g++"): + obj.env.append_value('CXXFLAGS', ['-Wall', '-Werror', '-Wno-unused']) cwd = os.getcwd() os.chdir(top_srcdir)