From 99b303eab3d7f2e8d496beb5424e87832023c873 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 5 Aug 2008 14:53:35 +0000 Subject: Lookup wrapper_{top,bottom}.c files in the src_dir, useful for VPATH build (i.e. distcheck). Add top_srcdir/binings to python syspath. --- bindings/python/lang.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bindings/python/lang.py') diff --git a/bindings/python/lang.py b/bindings/python/lang.py index 483e7614..fa47aa6b 100644 --- a/bindings/python/lang.py +++ b/bindings/python/lang.py @@ -28,6 +28,7 @@ import utils class Binding: def __init__(self, binding_data): self.binding_data = binding_data + self.src_dir = os.path.dirname(__file__) def is_pygobject(self, t): if t: @@ -580,7 +581,7 @@ if WSF_SUPPORT: def generate_wrapper(self, fd): - print >> fd, open('wrapper_top.c').read() + print >> fd, open(os.path.join(self.src_dir,'wrapper_top.c')).read() for h in self.binding_data.headers: print >> fd, '#include <%s>' % h print >> fd, '' @@ -595,7 +596,7 @@ if WSF_SUPPORT: for m in c.methods: self.generate_function_wrapper(m, fd) self.generate_wrapper_list(fd) - print >> fd, open('wrapper_bottom.c').read() + print >> fd, open(os.path.join(self.src_dir,'wrapper_bottom.c')).read() def generate_constants_wrapper(self, fd): print >> fd, '''static void -- cgit