Python's module mechanism doesn't recognize the dll files as a python
module. Once you solve this (e.g. add or remove the compiler or linker flag
that makes it work or break resp.), it should work.


well, the first problem just now is that there is no .dll resulting from
the autotools compilation of the pygimp module.

I guess libtool should have produced a .dll file, as no-one mentions a problem with that...
So check the logs from 'make'

$ make clean; make
there we have it:

*** Warning: linker path does not have real file for library -lpython24.
*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module gimpmodule.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

Aha! So I edited the Makefile, to add the missing path. and now alt least I have a dll, although its called 'gimpmodule.dll'... suppose I can just rename that to gimp.dll...

It is a python module (actually two of them), but even if you make sure that python should find them (either by a .pth file in python's Lib/site-packages
directory or by copying it there, it doesn't work.

Didn't get a pth file from autotools...
So what am I supposed to do now?
Do I simply put the dll in site-packages?

Hmm... that seems to have worked!

"make install" should be convinced to do this for me :-)

[or is this what the pth is about? do I need it to tell that gimp is in gimpmodule.dll?]

Gimp now loads the .py files and now they complain about
gimpfu module and no longer about the gimp module !!!

Ah, I needed to modify environ/pygimp.env

Good.
Now it's the _gimpenums module... hmm... there is no dll for this one either...

The only difference I see is that Makefile.am seems to be missing $(no_undefined) for _gimpenumsmodule.

Ah. got the dll now!
Same for gimpcolormodule...

damn. Now I get "undefined reference to `gimp_rgba_parse_css'"
and it is missing from  'gimpcolor.def"

$ for f in /target/lib/gimp/2.0/python/*module.dll; do cp $f ${f/module/}; done

Ah, now it starts up, and the "Python-fu" is there... yippee!


And now lets hope some autotools-wizard can deduce from this mail what needs to change...

The detection of python on msys is not too good:
$ python -c 'import sys; print sys.exec_prefix'
c:\Python24

which needs to be
c:/Python24

so I added a few [ | tr '\\\\' '/' ]'s in configure, but I suppose it needs to go in some
other file... maybe I need an updated python.m4 (msys has aclocal-1.7)?


_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

Reply via email to