[maemo-developers] Autobuilder and Python package dependencies

From: tz thomas at mich.com
Date: Fri Nov 14 20:45:58 EET 2008
Thanks for the information.  I did not know about python2.5-runtime.
It is mentioned in the python for Maemo release notes but it isn't
quite as clear in the tutorials and howtos (at least not as of a few
weeks ago) that this is the correct method for handling most
dependencies.

On Thu, Nov 13, 2008 at 1:54 AM, Benoît HERVIER <khertan at khertan.net> wrote:
> 2008/11/12, tz <thomas at mich.com>:
>> As far as I can tell, because there is nothing equivalent to the
>>  build-packages (things which require things like libdbus-dev or other
>>  -dev entries) for Python programs submitted to extras-devel.
>>
>>  This is a problem because I don't think the dependency list is checked
>>  against the import lines of any python file in the package.
>>
>>  So a package that needs to pull in one of the other python
>>  modules/libraries (dbus, gnome, etc.) won't do so and will simply (and
>>  if not run from xterm silently) fail.
>>
>>  And I don't always know which packages I need to specify explicitly
>>  since many pull others in automatically, or they are pulled in by
>>  almost every python program.
>>
>>  Is there any way to get the autobuilder to try running any python
>>  packages and failing the "build" if the required imports aren't there
>>  (or should this be added to bugzilla, and if so, under which
>>  category?)
>>
>>  Would it be possible or reasonable to have stubs (something like
>>  python loader) for them all so that "import dbus" instead of failing
>>  would fetch and install the package?
>>  _______________________________________________
>>  maemo-developers mailing list
>>  maemo-developers at maemo.org
>>  https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>
> Hello,
>
> A such check can t be done by autobuilder, as you know, python can
> load dynamically modules, you can load a module only when user press a
> button in an ui, as this module function is just use here. And as you
> should know python raise a exception on the import only when python
> interpreter try to execute it, not at the loading/parsing of the
> python code. In my example, a such exception is raise when user click
> on the button.
>
> But there is a package name python2.5-runtime which depends on all
> packages made by the pymaemo team. So it s install all package made by
> the pymameo team, and for third party python module package just
> specify it.
>
> For example pygtkeditor package depends on python2.5-runtime and
> pygtksourceview2.
>
> I don t think it s a good way to do things like that as it s install
> many unneed packages on the users device.
>
> But if you have create the program you should know which module it
> use, if you just port it,  use pychecker to know which module could be
> use.
>
>
> --
> Benoît HERVIER - http://khertan.net/
>

More information about the maemo-developers mailing list