Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring
@ 2013-11-22 23:00 Jérémie Galarneau
  2013-11-23  3:29 ` Simon Marchi
  0 siblings, 1 reply; 9+ messages in thread
From: Jérémie Galarneau @ 2013-11-22 23:00 UTC (permalink / raw)


Hi all,

I received a number of great comments about the Babeltrace Python API
since my last pull request. These patches, available on my personal
repository, aim at making the API feel more natural to Python
developers by using the appropriate language constructs where
appropriate.

The three "Fix" patches address bugs that were uncovered in the C
codebase while developing and testing this patch set.

https://github.com/jgalar/babeltrace.git

2be62ad Python-bindings: Refactor the Context class
32de3db Python-bindings: Refactor the TraceHandle class to use properties
7740532 Python-bindings: Refactor the Event class
10d1b96 Python-bindings: Move the _scopes array out of the Event class
99e8489 Python-bindings: Refactor the FieldDecl and EventDecl classes
425caab Python-bindings: Move declaration bindings out of the _Definition class
b5e4875 Fix: Use the bt_iter_set_pos function to set the begin_pos
3f8750e Fix: Take the iterator's end position into account
35e0cb7 Fix: bt_ctf_field_generic_validate should return < 0 on error
810922e Python-bindings: Refactor the CTFWriter API

I think these patches bring us to a point where the bindings/python
branch could be safely merged into master.

Thanks,
J?r?mie

-- 
J?r?mie Galarneau
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring
  2013-11-22 23:00 [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring Jérémie Galarneau
@ 2013-11-23  3:29 ` Simon Marchi
  2013-11-23  4:09   ` Simon Marchi
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2013-11-23  3:29 UTC (permalink / raw)


I'm getting this error when making in bindings/python:

sed "s/BABELTRACE_VERSION_STR/Babeltrace 1.1.1/g" <babeltrace.i.in >babeltrace.i
/usr/bin/swig -python -Wall -I. -I../../include babeltrace.i
babeltrace.i:367: Error: Syntax error in input(1).
make: *** [babeltrace_wrap.c] Error 1

Are you missing a little %pythoncode %{ around class ClockType ?
https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L361

On 22 November 2013 18:00, J?r?mie Galarneau
<jeremie.galarneau at efficios.com> wrote:
> Hi all,
>
> I received a number of great comments about the Babeltrace Python API
> since my last pull request. These patches, available on my personal
> repository, aim at making the API feel more natural to Python
> developers by using the appropriate language constructs where
> appropriate.
>
> The three "Fix" patches address bugs that were uncovered in the C
> codebase while developing and testing this patch set.
>
> https://github.com/jgalar/babeltrace.git
>
> 2be62ad Python-bindings: Refactor the Context class
> 32de3db Python-bindings: Refactor the TraceHandle class to use properties
> 7740532 Python-bindings: Refactor the Event class
> 10d1b96 Python-bindings: Move the _scopes array out of the Event class
> 99e8489 Python-bindings: Refactor the FieldDecl and EventDecl classes
> 425caab Python-bindings: Move declaration bindings out of the _Definition class
> b5e4875 Fix: Use the bt_iter_set_pos function to set the begin_pos
> 3f8750e Fix: Take the iterator's end position into account
> 35e0cb7 Fix: bt_ctf_field_generic_validate should return < 0 on error
> 810922e Python-bindings: Refactor the CTFWriter API
>
> I think these patches bring us to a point where the bindings/python
> branch could be safely merged into master.
>
> Thanks,
> J?r?mie
>
> --
> J?r?mie Galarneau
> EfficiOS Inc.
> http://www.efficios.com
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring
  2013-11-23  3:29 ` Simon Marchi
@ 2013-11-23  4:09   ` Simon Marchi
  2013-11-23  6:15     ` Jérémie Galarneau
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2013-11-23  4:09 UTC (permalink / raw)


Also, around line 230, the indentation is inconsistent, so Python
complains when you import babeltrace.

https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L230

Btw, thanks for doing this!

On 22 November 2013 22:29, Simon Marchi <simon.marchi at polymtl.ca> wrote:
> I'm getting this error when making in bindings/python:
>
> sed "s/BABELTRACE_VERSION_STR/Babeltrace 1.1.1/g" <babeltrace.i.in >babeltrace.i
> /usr/bin/swig -python -Wall -I. -I../../include babeltrace.i
> babeltrace.i:367: Error: Syntax error in input(1).
> make: *** [babeltrace_wrap.c] Error 1
>
> Are you missing a little %pythoncode %{ around class ClockType ?
> https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L361
>
> On 22 November 2013 18:00, J?r?mie Galarneau
> <jeremie.galarneau at efficios.com> wrote:
>> Hi all,
>>
>> I received a number of great comments about the Babeltrace Python API
>> since my last pull request. These patches, available on my personal
>> repository, aim at making the API feel more natural to Python
>> developers by using the appropriate language constructs where
>> appropriate.
>>
>> The three "Fix" patches address bugs that were uncovered in the C
>> codebase while developing and testing this patch set.
>>
>> https://github.com/jgalar/babeltrace.git
>>
>> 2be62ad Python-bindings: Refactor the Context class
>> 32de3db Python-bindings: Refactor the TraceHandle class to use properties
>> 7740532 Python-bindings: Refactor the Event class
>> 10d1b96 Python-bindings: Move the _scopes array out of the Event class
>> 99e8489 Python-bindings: Refactor the FieldDecl and EventDecl classes
>> 425caab Python-bindings: Move declaration bindings out of the _Definition class
>> b5e4875 Fix: Use the bt_iter_set_pos function to set the begin_pos
>> 3f8750e Fix: Take the iterator's end position into account
>> 35e0cb7 Fix: bt_ctf_field_generic_validate should return < 0 on error
>> 810922e Python-bindings: Refactor the CTFWriter API
>>
>> I think these patches bring us to a point where the bindings/python
>> branch could be safely merged into master.
>>
>> Thanks,
>> J?r?mie
>>
>> --
>> J?r?mie Galarneau
>> EfficiOS Inc.
>> http://www.efficios.com
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring
  2013-11-23  4:09   ` Simon Marchi
@ 2013-11-23  6:15     ` Jérémie Galarneau
  2013-11-23 15:26       ` Mathieu Desnoyers
  0 siblings, 1 reply; 9+ messages in thread
From: Jérémie Galarneau @ 2013-11-23  6:15 UTC (permalink / raw)


On Fri, Nov 22, 2013 at 11:09 PM, Simon Marchi <simon.marchi at polymtl.ca> wrote:
> Also, around line 230, the indentation is inconsistent, so Python
> complains when you import babeltrace.
>
> https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L230
>
> Btw, thanks for doing this!
>

And thanks for testing! I have addressed both issues and rebased the patches.
Here are the new revisions.

74ea15a Python-bindings: Refactor the Context class
464425e Python-bindings: Refactor the TraceHandle class to use properties
78d714e Python-bindings: Refactor the Event class
e404272 Python-bindings: Move the _scopes array out of the Event class
cb1fcc6 Python-bindings: Refactor the FieldDecl and EventDecl classes
8bb2718 Python-bindings: Move declaration bindings out of the _Definition class
d899d6d Fix: Use the bt_iter_set_pos function to set the begin_pos
5644e6f Fix: Take the iterator's end position into account
da2f697 Fix: bt_ctf_field_generic_validate should return < 0 on error
1400127 Python-bindings: Refactor the CTFWriter API

Regards,
J?r?mie

> On 22 November 2013 22:29, Simon Marchi <simon.marchi at polymtl.ca> wrote:
>> I'm getting this error when making in bindings/python:
>>
>> sed "s/BABELTRACE_VERSION_STR/Babeltrace 1.1.1/g" <babeltrace.i.in >babeltrace.i
>> /usr/bin/swig -python -Wall -I. -I../../include babeltrace.i
>> babeltrace.i:367: Error: Syntax error in input(1).
>> make: *** [babeltrace_wrap.c] Error 1
>>
>> Are you missing a little %pythoncode %{ around class ClockType ?
>> https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L361
>>
>> On 22 November 2013 18:00, J?r?mie Galarneau
>> <jeremie.galarneau at efficios.com> wrote:
>>> Hi all,
>>>
>>> I received a number of great comments about the Babeltrace Python API
>>> since my last pull request. These patches, available on my personal
>>> repository, aim at making the API feel more natural to Python
>>> developers by using the appropriate language constructs where
>>> appropriate.
>>>
>>> The three "Fix" patches address bugs that were uncovered in the C
>>> codebase while developing and testing this patch set.
>>>
>>> https://github.com/jgalar/babeltrace.git
>>>
>>> 2be62ad Python-bindings: Refactor the Context class
>>> 32de3db Python-bindings: Refactor the TraceHandle class to use properties
>>> 7740532 Python-bindings: Refactor the Event class
>>> 10d1b96 Python-bindings: Move the _scopes array out of the Event class
>>> 99e8489 Python-bindings: Refactor the FieldDecl and EventDecl classes
>>> 425caab Python-bindings: Move declaration bindings out of the _Definition class
>>> b5e4875 Fix: Use the bt_iter_set_pos function to set the begin_pos
>>> 3f8750e Fix: Take the iterator's end position into account
>>> 35e0cb7 Fix: bt_ctf_field_generic_validate should return < 0 on error
>>> 810922e Python-bindings: Refactor the CTFWriter API
>>>
>>> I think these patches bring us to a point where the bindings/python
>>> branch could be safely merged into master.
>>>
>>> Thanks,
>>> J?r?mie
>>>
>>> --
>>> J?r?mie Galarneau
>>> EfficiOS Inc.
>>> http://www.efficios.com
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev at lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
J?r?mie Galarneau
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring
  2013-11-23  6:15     ` Jérémie Galarneau
@ 2013-11-23 15:26       ` Mathieu Desnoyers
  2013-11-23 21:30         ` [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: outdated dist target babeltrace.i Jérémie Galarneau
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Desnoyers @ 2013-11-23 15:26 UTC (permalink / raw)




----- Original Message -----
> From: "J?r?mie Galarneau" <jeremie.galarneau@efficios.com>
> To: "Simon Marchi" <simon.marchi at polymtl.ca>
> Cc: lttng-dev at lists.lttng.org
> Sent: Saturday, November 23, 2013 1:15:05 AM
> Subject: Re: [lttng-dev] [PULL REQUEST babeltrace] Python bindings API	refactoring
> 
> On Fri, Nov 22, 2013 at 11:09 PM, Simon Marchi <simon.marchi at polymtl.ca>
> wrote:
> > Also, around line 230, the indentation is inconsistent, so Python
> > complains when you import babeltrace.
> >
> > https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L230
> >
> > Btw, thanks for doing this!
> >
> 
> And thanks for testing! I have addressed both issues and rebased the patches.
> Here are the new revisions.
> 
> 74ea15a Python-bindings: Refactor the Context class
> 464425e Python-bindings: Refactor the TraceHandle class to use properties
> 78d714e Python-bindings: Refactor the Event class
> e404272 Python-bindings: Move the _scopes array out of the Event class
> cb1fcc6 Python-bindings: Refactor the FieldDecl and EventDecl classes
> 8bb2718 Python-bindings: Move declaration bindings out of the _Definition
> class
> d899d6d Fix: Use the bt_iter_set_pos function to set the begin_pos
> 5644e6f Fix: Take the iterator's end position into account
> da2f697 Fix: bt_ctf_field_generic_validate should return < 0 on error
> 1400127 Python-bindings: Refactor the CTFWriter API

All merged into bindings/python branch, but not yet into master, here is why:

make dist
unpack dist tarball into tmp directory
create another tmp directory (for out of tree build)
invoke:
path_to_tmp_dir/babeltrace-1.1.1/configure --enable-python-bindings

make -j4

make[3]: Entering directory `/tmp/t4/bindings/python'
make[3]: *** No rule to make target `babeltrace.i.in', needed by `babeltrace.i'.  Stop.

can you provide a fix for make dist and/or out of tree build ?

Thanks,

Mathieu


> 
> Regards,
> J?r?mie
> 
> > On 22 November 2013 22:29, Simon Marchi <simon.marchi at polymtl.ca> wrote:
> >> I'm getting this error when making in bindings/python:
> >>
> >> sed "s/BABELTRACE_VERSION_STR/Babeltrace 1.1.1/g" <babeltrace.i.in
> >> >babeltrace.i
> >> /usr/bin/swig -python -Wall -I. -I../../include babeltrace.i
> >> babeltrace.i:367: Error: Syntax error in input(1).
> >> make: *** [babeltrace_wrap.c] Error 1
> >>
> >> Are you missing a little %pythoncode %{ around class ClockType ?
> >> https://github.com/jgalar/babeltrace/blob/bindings/python/bindings/python/babeltrace.i.in#L361
> >>
> >> On 22 November 2013 18:00, J?r?mie Galarneau
> >> <jeremie.galarneau at efficios.com> wrote:
> >>> Hi all,
> >>>
> >>> I received a number of great comments about the Babeltrace Python API
> >>> since my last pull request. These patches, available on my personal
> >>> repository, aim at making the API feel more natural to Python
> >>> developers by using the appropriate language constructs where
> >>> appropriate.
> >>>
> >>> The three "Fix" patches address bugs that were uncovered in the C
> >>> codebase while developing and testing this patch set.
> >>>
> >>> https://github.com/jgalar/babeltrace.git
> >>>
> >>> 2be62ad Python-bindings: Refactor the Context class
> >>> 32de3db Python-bindings: Refactor the TraceHandle class to use properties
> >>> 7740532 Python-bindings: Refactor the Event class
> >>> 10d1b96 Python-bindings: Move the _scopes array out of the Event class
> >>> 99e8489 Python-bindings: Refactor the FieldDecl and EventDecl classes
> >>> 425caab Python-bindings: Move declaration bindings out of the _Definition
> >>> class
> >>> b5e4875 Fix: Use the bt_iter_set_pos function to set the begin_pos
> >>> 3f8750e Fix: Take the iterator's end position into account
> >>> 35e0cb7 Fix: bt_ctf_field_generic_validate should return < 0 on error
> >>> 810922e Python-bindings: Refactor the CTFWriter API
> >>>
> >>> I think these patches bring us to a point where the bindings/python
> >>> branch could be safely merged into master.
> >>>
> >>> Thanks,
> >>> J?r?mie
> >>>
> >>> --
> >>> J?r?mie Galarneau
> >>> EfficiOS Inc.
> >>> http://www.efficios.com
> >>>
> >>> _______________________________________________
> >>> lttng-dev mailing list
> >>> lttng-dev at lists.lttng.org
> >>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 
> 
> 
> --
> J?r?mie Galarneau
> EfficiOS Inc.
> http://www.efficios.com
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: outdated dist target babeltrace.i
  2013-11-23 15:26       ` Mathieu Desnoyers
@ 2013-11-23 21:30         ` Jérémie Galarneau
  2013-11-24  1:31           ` Mathieu Desnoyers
  0 siblings, 1 reply; 9+ messages in thread
From: Jérémie Galarneau @ 2013-11-23 21:30 UTC (permalink / raw)


This fixes the dist target for the python bindings. The
python-complements.h/.c files must be distributed, but not installed,
in order to build the python bindings.

Signed-off-by: J?r?mie Galarneau <jeremie.galarneau at efficios.com>
---
 bindings/python/Makefile.am | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index b25ce92..2952454 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -3,14 +3,14 @@ babeltrace.i: babeltrace.i.in
 
 AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/
 
-EXTRA_DIST = babeltrace.i
-python_PYTHON = babeltrace.py
+EXTRA_DIST = babeltrace.i.in
+nodist_python_PYTHON = babeltrace.py
 pyexec_LTLIBRARIES = _babeltrace.la
 
 MAINTAINERCLEANFILES = babeltrace_wrap.c babeltrace.py
 
-_babeltrace_la_SOURCES = babeltrace_wrap.c python-complements.c
-
+nodist__babeltrace_la_SOURCES = babeltrace_wrap.c
+_babeltrace_la_SOURCES = python-complements.h python-complements.c
 _babeltrace_la_LDFLAGS = -module
 
 _babeltrace_la_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
-- 
1.8.4.2




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: outdated dist target babeltrace.i
  2013-11-23 21:30         ` [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: outdated dist target babeltrace.i Jérémie Galarneau
@ 2013-11-24  1:31           ` Mathieu Desnoyers
  2013-11-28 18:19             ` [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: Out of tree build fails to find babeltrace.i Jérémie Galarneau
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Desnoyers @ 2013-11-24  1:31 UTC (permalink / raw)


----- Original Message -----
> From: "J?r?mie Galarneau" <jeremie.galarneau@efficios.com>
> To: lttng-dev at lists.lttng.org
> Sent: Saturday, November 23, 2013 4:30:59 PM
> Subject: [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix:	outdated dist target babeltrace.i
> 
> This fixes the dist target for the python bindings. The
> python-complements.h/.c files must be distributed, but not installed,
> in order to build the python bindings.

make distclean
make dist
cp the tarball elsewhere, extract
then, from other path:
path/to/babeltrace-1.1.1/configure --enable-python-bindings
make -j4

make[3]: Entering directory `/tmp/z/bindings/python'
sed "s/BABELTRACE_VERSION_STR/Babeltrace 1.1.1/g" <babeltrace.i.in >babeltrace.i
/bin/bash: babeltrace.i.in: No such file or directory

(with your patch applied)

Anything else missing ?

Thanks,

Mathieu

> 
> Signed-off-by: J?r?mie Galarneau <jeremie.galarneau at efficios.com>
> ---
>  bindings/python/Makefile.am | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
> index b25ce92..2952454 100644
> --- a/bindings/python/Makefile.am
> +++ b/bindings/python/Makefile.am
> @@ -3,14 +3,14 @@ babeltrace.i: babeltrace.i.in
>  
>  AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/
>  
> -EXTRA_DIST = babeltrace.i
> -python_PYTHON = babeltrace.py
> +EXTRA_DIST = babeltrace.i.in
> +nodist_python_PYTHON = babeltrace.py
>  pyexec_LTLIBRARIES = _babeltrace.la
>  
>  MAINTAINERCLEANFILES = babeltrace_wrap.c babeltrace.py
>  
> -_babeltrace_la_SOURCES = babeltrace_wrap.c python-complements.c
> -
> +nodist__babeltrace_la_SOURCES = babeltrace_wrap.c
> +_babeltrace_la_SOURCES = python-complements.h python-complements.c
>  _babeltrace_la_LDFLAGS = -module
>  
>  _babeltrace_la_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
> --
> 1.8.4.2
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: Out of tree build fails to find babeltrace.i
  2013-11-24  1:31           ` Mathieu Desnoyers
@ 2013-11-28 18:19             ` Jérémie Galarneau
  2013-11-29  6:21               ` Mathieu Desnoyers
  0 siblings, 1 reply; 9+ messages in thread
From: Jérémie Galarneau @ 2013-11-28 18:19 UTC (permalink / raw)


This fixes the out of tree builds by using the appropriate top_srcdir
and top_builddir variables in the bindings' Makefile.

Signed-off-by: J?r?mie Galarneau <jeremie.galarneau at efficios.com>
---
 bindings/python/Makefile.am | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index 2952454..0d96700 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -1,5 +1,7 @@
 babeltrace.i: babeltrace.i.in
-	sed "s/BABELTRACE_VERSION_STR/Babeltrace $(PACKAGE_VERSION)/g" <babeltrace.i.in >babeltrace.i
+	sed "s/BABELTRACE_VERSION_STR/Babeltrace $(PACKAGE_VERSION)/g" < \
+		$(top_srcdir)/bindings/python/babeltrace.i.in > \
+		$(top_builddir)/bindings/python/babeltrace.i
 
 AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/
 
@@ -17,11 +19,12 @@ _babeltrace_la_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
 
 _babeltrace_la_LIBS = $(GLIB_LIBS)
 
-_babeltrace_la_LIBADD = $(top_srcdir)/formats/ctf/libbabeltrace-ctf.la	\
-			$(top_srcdir)/formats/ctf-text/libbabeltrace-ctf-text.la
+_babeltrace_la_LIBADD = $(top_builddir)/formats/ctf/libbabeltrace-ctf.la \
+	$(top_builddir)/formats/ctf-text/libbabeltrace-ctf-text.la
 
 # SWIG 'warning md variable unused' fixed after SWIG build:
 babeltrace_wrap.c: babeltrace.i
-	$(SWIG) -python -Wall -I. -I$(top_srcdir)/include babeltrace.i
+	$(SWIG) -python -Wall -I. -I$(top_srcdir)/include \
+		$(top_builddir)/bindings/python/babeltrace.i
 
 CLEANFILES = babeltrace.i babeltrace.py babeltrace_wrap.c
-- 
1.8.4.2




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: Out of tree build fails to find babeltrace.i
  2013-11-28 18:19             ` [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: Out of tree build fails to find babeltrace.i Jérémie Galarneau
@ 2013-11-29  6:21               ` Mathieu Desnoyers
  0 siblings, 0 replies; 9+ messages in thread
From: Mathieu Desnoyers @ 2013-11-29  6:21 UTC (permalink / raw)


----- Original Message -----
> From: "J?r?mie Galarneau" <jeremie.galarneau@efficios.com>
> To: lttng-dev at lists.lttng.org
> Sent: Thursday, November 28, 2013 7:19:10 PM
> Subject: [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix:	Out of tree build fails to find
> babeltrace.i
> 
> This fixes the out of tree builds by using the appropriate top_srcdir
> and top_builddir variables in the bindings' Makefile.

merged into bindings/python. I finally merged bindings/python into master, good job !!!

Thanks,

Mathieu

> 
> Signed-off-by: J?r?mie Galarneau <jeremie.galarneau at efficios.com>
> ---
>  bindings/python/Makefile.am | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
> index 2952454..0d96700 100644
> --- a/bindings/python/Makefile.am
> +++ b/bindings/python/Makefile.am
> @@ -1,5 +1,7 @@
>  babeltrace.i: babeltrace.i.in
> -	sed "s/BABELTRACE_VERSION_STR/Babeltrace $(PACKAGE_VERSION)/g"
> <babeltrace.i.in >babeltrace.i
> +	sed "s/BABELTRACE_VERSION_STR/Babeltrace $(PACKAGE_VERSION)/g" < \
> +		$(top_srcdir)/bindings/python/babeltrace.i.in > \
> +		$(top_builddir)/bindings/python/babeltrace.i
>  
>  AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include/
>  
> @@ -17,11 +19,12 @@ _babeltrace_la_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
>  
>  _babeltrace_la_LIBS = $(GLIB_LIBS)
>  
> -_babeltrace_la_LIBADD = $(top_srcdir)/formats/ctf/libbabeltrace-ctf.la	\
> -			$(top_srcdir)/formats/ctf-text/libbabeltrace-ctf-text.la
> +_babeltrace_la_LIBADD = $(top_builddir)/formats/ctf/libbabeltrace-ctf.la \
> +	$(top_builddir)/formats/ctf-text/libbabeltrace-ctf-text.la
>  
>  # SWIG 'warning md variable unused' fixed after SWIG build:
>  babeltrace_wrap.c: babeltrace.i
> -	$(SWIG) -python -Wall -I. -I$(top_srcdir)/include babeltrace.i
> +	$(SWIG) -python -Wall -I. -I$(top_srcdir)/include \
> +		$(top_builddir)/bindings/python/babeltrace.i
>  
>  CLEANFILES = babeltrace.i babeltrace.py babeltrace_wrap.c
> --
> 1.8.4.2
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-29  6:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22 23:00 [lttng-dev] [PULL REQUEST babeltrace] Python bindings API refactoring Jérémie Galarneau
2013-11-23  3:29 ` Simon Marchi
2013-11-23  4:09   ` Simon Marchi
2013-11-23  6:15     ` Jérémie Galarneau
2013-11-23 15:26       ` Mathieu Desnoyers
2013-11-23 21:30         ` [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: outdated dist target babeltrace.i Jérémie Galarneau
2013-11-24  1:31           ` Mathieu Desnoyers
2013-11-28 18:19             ` [lttng-dev] [PATCH babeltrace python/bindings] Python-bindings fix: Out of tree build fails to find babeltrace.i Jérémie Galarneau
2013-11-29  6:21               ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox