Used the wrong email address the first time.

---------- Forwarded message ----------
From: Jon Nordby <[email protected]>
Date: 20 January 2013 14:29
Subject: Re: My animation app
To: Manuel Quiñones <[email protected]>
Cc: mypaint-discuss <[email protected]>


On 19 January 2013 22:49, Manuel Quiñones <[email protected]> wrote:
> Hey Jon, (sending to mypaint-discuss)

Hey Manuel,
Yes, lets keep others in the loop too. Thanks for testing and pushing
the state of libmypaint further.

>> One thing to note is that the mypaint-gegl.py script does not only use
>> the brushlib, it also uses the MyPaint C++ extensions. So for your
>> application you should try to build the brushlib with introspection
>> (pass enable_introspection=true to scons) and then do "from
>> gi.repository import MyPaint, MyPaintGegl" instead of the current
>> "from lib import mypaintlib, tiledsurface, brush".
>
> Good advice, yes that's the way to go for my app.
>
> So I installed with introspection but I can't import MyPaint or
> MyPaintGegl after install.  I can see the typelib files in the
> corresponding path.  I might be doing something stupid:

Looks like the -$version in .gir and .typelib is mandatory. I think it
was optional before, but in any case I've fixed it in master now:
http://gitorious.org/mypaint/mypaint/commit/6b374591d203e6cbdecd1dd9fa0f67e2614503b3

Also fixed some other bugs, and added the beginning of an example of
how to use the GI bindings from Python, see brushlib/examples/gegl.py
As you can see from the comments, things are still a bit rough.
Perhaps you know how to address the "# TODO: Is there a better way to
list all enums with GI?" comment?

I intend to address the other comments later today.

> [manuq@manuq-laptop mypaint]$ ls $GI_TYPELIB_PATH
> Babl-0.1.typelib  GeglGtk2-0.1.typelib  MyPaintGegl.typelib
> Gegl-0.2.typelib  GeglGtk3-0.1.typelib  MyPaint.typelib
> [manuq@manuq-laptop mypaint]$ python
> Python 2.7.3 (default, Jul 24 2012, 10:05:38)
> [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from gi.repository import Gegl, GeglGtk3
>>>> from gi.repository import MyPaint, MyPaintGegl
> ERROR:root:Could not find any typelib for MyPaint
> ERROR:root:Could not find any typelib for MyPaintGegl
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: cannot import name MyPaint
>>>>
>
> My scons commands were:
>
> scons enable_introspection=true brushlib_only=true prefix=$PREFIX_GEGL
> scons prefix=$PREFIX_GEGL install
>
> Cheers,
>
> --
> .. manuq ..



--
Jon Nordby - www.jonnor.com

_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to