From: Andy Grover <agrover@redhat.com>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>,
linux-modules <linux-modules@vger.kernel.org>,
"W. Trevor King" <wking@tremily.us>
Subject: Re: [announce] python-kmod 0.9
Date: Mon, 24 Mar 2014 10:12:26 -0700 [thread overview]
Message-ID: <5330677A.5030005@redhat.com> (raw)
In-Reply-To: <CAKi4VA+ft=gM+QeqEYmy1eqRK==SGvCvTurEszf+ZLTCN8b3Wg@mail.gmail.com>
On 03/24/2014 05:02 AM, Lucas De Marchi wrote:
> I've just pushed a branch named "python" which contains the python
> bindings. I did it a bit different than you:
>
> - All the code from your repository was imported maintaining the
> history. I would like to keep it, so I did a merge of the final import
> (fast forward, but forced to contain a commit).
> - Python bindings are built with autotools. This allows to easily
> express the dependency with libkmod... but I'm not sure this is ideal
> as opposed to having a target to explicitely calling setuptools. Any
> opinion?
>
> Then I noticed the example given in the README file doesn't work.
> Neither by installing they original python-kmod package :-/
>
> >>> import kmod
> >>> km = kmod.Kmod()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'Kmod'
> >>> dir(kmod)
> ['__builtins__', '__doc__', '__file__', '__loader__', '__name__',
> '__package__', '__path__', '__version__', 'list', 'version']
>
The old 'python-kmod' pkg works for me:
[agrover@work ~/.../python/kmod ((fac4d09...))]$ ipython
In [1]: import kmod
In [2]: km = kmod.Kmod()
In [3]: sc = list(km.lookup("soundcore"))[0]
In [4]: sc.path
Out[4]: u'/lib/modules/3.13.6-200.fc20.x86_64/kernel/sound/soundcore.ko'
but when I try to use the new stuff:
[agrover@work ~/.../python/kmod ((fac4d09...))]$
PYTHONPATH="/home/agrover/git/kmod/libkmod/python/kmod/.libs" ipython
In [1]: import kmod
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-ff824b795612> in <module>()
----> 1 import kmod
ImportError: dynamic module does not define init function (initkmod)
Is this what you're seeing as well?
Regards -- Andy
next prev parent reply other threads:[~2014-03-24 17:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <509C4944.3040907@redhat.com>
2013-11-11 19:28 ` [announce] python-kmod 0.9 Lucas De Marchi
2013-11-11 19:40 ` Andy Grover
2013-12-18 19:38 ` Lucas De Marchi
2013-12-19 1:20 ` Andy Grover
2013-12-22 21:52 ` Lucas De Marchi
2014-03-24 12:02 ` Lucas De Marchi
2014-03-24 17:12 ` Andy Grover [this message]
2014-03-26 17:45 ` Lucas De Marchi
2014-03-26 20:32 ` Andy Grover
2014-03-26 20:49 ` Lucas De Marchi
2014-03-26 20:56 ` Andy Grover
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=5330677A.5030005@redhat.com \
--to=agrover@redhat.com \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=lucas.demarchi@profusion.mobi \
--cc=wking@tremily.us \
/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;
as well as URLs for NNTP newsgroup(s).