From: jean.spector@gmail.com (Jean Spector)
Subject: [lttng-dev] Babeltrace python bindings documentation is no up-to-date
Date: Mon, 31 Oct 2016 22:02:55 +0200 [thread overview]
Message-ID: <CABVQWN1USj+gH_horiYtB3V0q0nCOQ+NWdknA2AdVwdyMoGtHg@mail.gmail.com> (raw)
In-Reply-To: <CAB4xu_0FBn00woj==OqKyiQ67cNNsKBNcKHKoevP8ki=oOFHTg@mail.gmail.com>
Thank you Philippe.
Adding a different documentation page for older versions (it's the latest
package on RHEL 7.2 - so I'd expect more newbies to encounter this issue)
could help anyone trying the Python bindings for the first time.
I'm sure you realize that trying the official example and failing can be
quite frustrating and could turn off potential users. This is especially
true if it comes after other issues(let me know if you'd prefer these to be
sent in separate emails):
RHEL 7.2 uses python 3.4, but babeltrace-python-1.2.4 requires python 3.3,
which is not available anymore - at least not out of the box.
Again, I've solved the issue for myself, so it's not a support call. The
idea is that it would be great if the initial install+run stage was made
less painful.
I believe it would increase the user base as, for instance, I was on the
verge of giving up after building from source has also failed for me.
When trying to build from latest stable source (1.4.0) on RHEL 7.2, I've
encountered a couple of issues:
1. configure would fail on popt. "ln -s /usr/lib64/libpopt.so.0
/usr/lib64/libpopt.so" worked around the issue, but there must be a better
way (or a line in the README).
2. "python3 -c 'import babeltrace'" would fail with "ImportError:
/usr/local/lib64/python3.4/site-packages/babeltrace/_nativebt.so: undefined
symbol: PyInstance_Type"
That's where I gave up trying to build from source. It could be due to the
same python 3.4 - but it's just a guess.
==========
To recap, I see 3 issues here:
1. Documentation - any platform
2. Install of the latest babeltrace-python (1.2.4) - RHEL 7.2
3. Building from the latest stable source (1.4.0) - RHEL 7.2
In any case, thanks for the great tool. I hope to put it to good use.
Jean
On Mon, Oct 31, 2016 at 7:07 PM, Philippe Proulx <eeppeliteloop at gmail.com>
wrote:
> On Sat, Oct 29, 2016 at 9:55 AM, Jean Spector <jean.spector at gmail.com>
> wrote:
> > When trying to use the example from
> > http://diamon.org/babeltrace/docs/python/examples/ (pointed to via
> > http://lttng.org/viewers/), the code is not up-to-date.
> >
> > For instance, the first line in the example (import babeltrace.reader)
> fails
> > as there's no 'reader' to import.
> >
> > I've managed to get over it, but thought it would be better to have a
> > working example code.
>
> I wrote this doc and it was merged into master more than a year ago.
> When writing this doc, I split the `babeltrace` package into the
> `reader` and `writer` subpackages to make the autodocumentation with
> Sphinx easier. Now it looks like this split was never backported to
> v1.2, v1.3, v1.4, and soon v1.5.
>
> The `Babeltrace 1.2.0` version you see on the front page is just the
> current version found when I generated the online version. Really, the
> title should say `Babeltrace (master branch)`. The master branch will
> become Babeltrace 2.0 soon. In the meantime, simply drop the `reader`
> subpackage when you read the doc and try examples. So
>
> import babeltrace.reader as btreader
>
> trace_collection = btreader.TraceCollection()
>
> becomes
>
> import babeltrace as btreader
>
> trace_collection = btreader.TraceCollection()
>
> For the CTF writer part, drop the `writer` subpackage, and import the
> `CTFWriter` class: you'll find all the documented classes within this
> class (kind of weird, and one of the reasons I created a subpackage
> instead):
>
> import babeltrace.writer as btwriter
>
> writer = btwriter.Writer(trace_path)
>
> becomes
>
> from babeltrace import CTFWriter as btwriter
>
> writer = btwriter.Writer(trace_path)
>
> Note that the new subpackage split is backward compatible with the
> bindings of v1.x, so the code you write now will continue to work...
> forever.
>
> I might add an equivalent of this response as a note in the generated
> documentation.
>
> BR,
> Phil
>
> >
> > P.S. I'm running RHEL 7.2 with babeltrace-python-1.2.4-1.el7.x86_64
> >
> > Best Regards,
> > Jean
> >
> >
> > _______________________________________________
> > lttng-dev mailing list
> > lttng-dev at lists.lttng.org
> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20161031/a0247173/attachment.html>
next prev parent reply other threads:[~2016-10-31 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-29 13:55 Jean Spector
2016-10-31 17:07 ` Philippe Proulx
2016-10-31 20:02 ` Jean Spector [this message]
2016-10-31 20:38 ` Philippe Proulx
2016-10-31 20:44 ` Jean Spector
2016-10-31 20:54 ` Michael Jeanson
2016-10-31 21:20 ` Jean Spector
2016-10-31 21:34 ` Michael Jeanson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABVQWN1USj+gH_horiYtB3V0q0nCOQ+NWdknA2AdVwdyMoGtHg@mail.gmail.com \
--to=jean.spector@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox