Re: Python 3.2mu breaks pycairo ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Mar 22, 2011 at 7:24 PM, Fons Adriaensen <fons@xxxxxxxxxxxxxx> wrote:
> Hello all,
>
> A full system update yesterday replaced Python 3.1 by 3.2mu
> (what does the 'mu' mean BTW) and this seems to break pycairo:
>
> Traceback (most recent call last):
>  File "./mkmeter.py", line 3, in <module>
>    from cairo import *
>  File "/usr/lib/python3.2/site-packages/cairo/__init__.py", line 18, in <module>
>    from ._cairo import *
> ImportError: /usr/lib/python3.2/site-packages/cairo/_cairo.cpython-32mu.so: undefined symbol: PyCObject_FromVoidPtr
>
> And indeed PyCObject_FromVoidPtr() and its inverse, PyCObject_AsVoidPtr()
> are no longer available in Python 3.2.
>
> They can be replaced by
>
> P = PyCObject_FromVoidPtr(X, destroy) --> P = PyCapsule_New(X, 0, destroy)
> X = PyCObject_AsVoidPtr(P)            --> X = PyCapsule_GetPointer(P, 0)
>
> and the 'destroy' function now takes a PyObject* instead of PyCObject*,
> so you have to use PyCapsule_GetPointer() inside it to get the C/C++
> pointer.
>
> Ciao,
>
> --
> FA
>
>

Please report a bug report at bugs.archlinux.org


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux