diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-08-05 14:53:35 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-08-05 14:53:35 +0000 |
commit | 99b303eab3d7f2e8d496beb5424e87832023c873 (patch) | |
tree | 5c602a62a6270c0dbe2c196d5eb675d8a86a3cb4 /bindings/python/lang.py | |
parent | f088610c6ed93a5670cffa6cfcdb0a60804888dd (diff) | |
download | lasso-99b303eab3d7f2e8d496beb5424e87832023c873.tar.gz lasso-99b303eab3d7f2e8d496beb5424e87832023c873.tar.xz lasso-99b303eab3d7f2e8d496beb5424e87832023c873.zip |
Lookup wrapper_{top,bottom}.c files in the src_dir, useful for VPATH build
(i.e. distcheck). Add top_srcdir/binings to python syspath.
Diffstat (limited to 'bindings/python/lang.py')
-rw-r--r-- | bindings/python/lang.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 |