Hello, Quoting "Rémi Pannequin" <remi.panneq...@cran.uhp-nancy.fr>: > So, I've set up a MinGW/MSys installation to build pygoocanvas and > pygtksourceview, but they need development files (headers and > package-config) for pycairo, pygobject, pygtk... I didn't find these > files on ftp.gnome.org...
Before everything else, if you're using Python 2.6.3 on windows to compile python extensions with mingw32, you'll need to patch distutils. See http://bugs.python.org/issue7131 for more details. First, you need to make sure you have the required packages installed for GTK+ and dependencies. See [1] for the list I have used. Add the directory you used for your GTK+ installation to the windows PATH environment. Mine looks like '/d/Progra~1/gtk-bundle/2.16.6-20090911'. Then you install pycairo, pygobject, pygtk, etc. Those development files you mention are included in the installers of pycairo, pygobject, pygtk, etc (they get installed into /path/to/Python26/). Then, you need to make sure your PKG_CONFIG_PATH environment variable is set correctly before executing your build (within msys). Mine looks like '/d/Progra~1/gtk-bundle/2.16.6-20090911:/d/Progra~1/Python26/Lib/pkgconfig' (within msys, windows itself uses ';' as a seperator, msys uses ':'). If everything is installed correctly and the PKG_CONFIG_PATH environment variable is set correctly the command (within msys) 'pkg-config --list-all | wc -l' should return 43 lines. Run as 'pkg-config --list-all' to see a detailed list. With all that, your good to start compiling... > My questions: > * Do have I to compile pygobject/pycairo/pygtk to be able to compile > pygoocanvas and pygtksourceview, or is there an alternative ? No. Just having them installed should be enough. But if you insist on compiling, you'll need to build pycairo, pygobject, pygtk in that order. Then it doesn't matter if you start with pygoocanvas or pygtksourceview [2] or something else. Just respect the packages' dependencies. > * To compile pygobject/pycairo/pygtk, what are the recommended > versions and configure switches ? On windows, the recommended way to compile pycairo/pygobject/pygtk/etc are the setup.py files included with the packages' sources. See [3] for more details. Note that currently, the windows build system is in need of some love. > * More generally, what are the pro and cons of "compile your own" vs. > "use binaries" in this situation ? Eerm, the binary releases on ftp.gnome.org are built by people who have been doing this for years (thanks to everybody involved in this!), are generally tested by the same people and are in use by a lot of people. This means those releases receive a whole lot of testing. And the binary releases are supported (if you encounter a bug you can complain to bugs.gnome.org). You're basically on your own when you compile your own snapshots. That being said, i've been compiling my own _snapshots_ of the following for python 2.6: pycairo-1.8.8 (patched, upstream refuses to support mingw32), pygobject-2.21.0 (following git master, patches by John Stowers, extra patches by myself), pygtk-2.16.0 (following git master, patches by John Stowers, extra patches by myself), pygoocanvas-0.14.2 (custom setup.py) pygtksourceview-2.8.1 (fixed setup.py, needs a recompiled gtksourceview snapshot, see [2] for details). These do not contain gtk-doc documentation (on my todo list) and have to be installed in the order listed above. If you test these, unintall all previous versions first! You can find those snapshots here: http://www.optionexplicit.be/projects/gnome-windows/ Hope I haven't forgotten anything, Have fun, Dieter [1] I'm currently using the following packages: freetype-dev_2.3.9-1_win32.zip freetype_2.3.9-1_win32.zip gnome-common-dev_2.28.0-1_win32.zip gnome-common_2.28.0-1_win32.zip goocanvas-0.15-win32.zip goocanvas-dev-0.15-win32.zip gtk+-bundle_2.16.6-20090911_win32.zip intltool-dev_0.40.4-1_win32.zip intltool_0.40.4-1_win32.zip libbzip2-dev_1.0.5-2_win32.zip libbzip2_1.0.5-2_win32.zip libcroco-dev_0.6.2-1_win32.zip libcroco_0.6.2-1_win32.zip libglade-dev_2.6.4-1_win32.zip libglade_2.6.4-1_win32.zip libgsf-dev_1.14.15-1_win32.zip libgsf-gnome-dev_1.14.15-1_win32.zip libgsf-gnome_1.14.15-1_win32.zip libgsf_1.14.15-1_win32.zip libiconv-1.9.1.bin.woe32.zip librsvg-dev_2.26.0-1_win32.zip librsvg_2.26.0-1_win32.zip libxml2-dev_2.7.4-1_win32.zip libxml2_2.7.4-1_win32.zip svg-gdk-pixbuf-loader_2.26.0-1_win32.zip svg-gtk-engine_2.26.0-1_win32.zip [2] You'll need to recompile gtksourceview before you can start compiling pygtksourceview. This because the current gtksourceview version on ftp.gnome.org links to libxml-2.dll, but libxml2-2.7.4-1_win32.zip only contains libxml-2.0.dll. Not doing this will result in a succesfull pygtksourceview build, but you'll experience all sort of pain at runtime: 'import gtksourceview' will work, 'import gtk; import gtksourceview' will fail with an obscure memory error. [3] http://www.optionexplicit.be/projects/gnome-windows/compiling.txt ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/