[cairo] Re: cairo and pycairo 0.6.0cvs win32 builds

Steve Chaplin stevech1097 at yahoo.com.au
Wed Aug 10 07:03:07 PDT 2005

On Mon, 2005-08-08 at 12:27 -0700, Vittorio Palmisano wrote:
>         Hello,
>         you can find a win32 build for libpixman, glitz, cairo and
>         pycairo (for
>         python2.3) here:
>         http://anakonda.altervista.org/archivio/
I had a look at this link, there's nothing there!

>         I have built them with mingw32, on attachment there is the
>         patch required for
>         pycairo, the command used is:
>          > python setup.py build -cmingw32
>          > python setup.py bdist_wininst
>         for pycairo ./configure doesn't work, you have to add manually
>         a __init__.py file
>         before make bdist_wininst.

Why does setup.py need:
+import sys
        +if sys.platform == 'win32':
        +    include_dirs += get_include('freetype2')
        +    library_dirs += get_lib_dirs('freetype2')
        +    libraries += get_libs('freetype2') + ['gdi32','msimg32']
These cairo lines should pick up the freetype dependency
        +include_dirs = get_include('cairo')
        +library_dirs = get_lib_dirs('cairo')
        +libraries = get_libs('cairo')
If its a problem with the names 'freetype' and 'freetype2' not matching
then cairo or freetype should be patched.
I don't understand these lines:
         PyTypeObject PycairoContext_Type = {
        +#if defined(WIN32) || defined(__CYGWIN__)
        +    PyObject_HEAD_INIT(NULL)
        +#else /* ! WIN32 */
        -    0,                                  /* ob_size */

The line "PyObject_HEAD_INIT(&PyType_Type)" is used in
Python-2.4.1/Objects/listobject.c (and many other *.c files) so it looks
like a standard Python statement, why does it need to be changed?

gcc on Linux handles it OK. mingw uses gcc so I'd expect it to handle it
just the same.

pycairo/test/test.py has:
         if __name__ == "__main__":
        -    if sys.version_info < (2,4):
        -        raise SystemExit ("Python 2.4 or higher required")
because it uses doctest.DocFileSuite which is new in 2.4. Does it work
for you using Python 2.3?


Send instant messages to your online friends http://au.messenger.yahoo.com 

More information about the cairo mailing list