Errors compiling Cython file

59 views
Skip to first unread message

Greg Wildman

unread,
Apr 2, 2011, 4:37:41 AM4/2/11
to pyffmpeg
Guys,

Compiling from source on Fedora 14. I get the following errors with
regards to the __new__ method.

[root@charon ~]# yum install numpy Cython python-devel
...
[gregw@charon pyffmpeg-2.1beta]$ python setup.py build
running build
running build_ext
cythoning pyffmpeg.pyx to pyffmpeg.c

Error compiling Cython file:
------------------------------------------------------------
...

cdef AVFormatContext *FormatCtx
# self.prepacket=<AVPacket *>None
# self.packet=&self.packetbufa

def __new__(self):
^
------------------------------------------------------------

pyffmpeg.pyx:808:4: __new__ method of extension type will change
semantics in a future version of Pyrex and Cython. Use __cinit__
instead.

Error compiling Cython file:
------------------------------------------------------------
...
cdef object default_audio_track
cdef object default_video_track
cdef int with_readahead
cdef unsigned long long int seek_before_security_interval

def __new__(self,with_readahead=True,seek_before=4000):
^
------------------------------------------------------------

pyffmpeg.pyx:1835:4: __new__ method of extension type will change
semantics in a future version of Pyrex and Cython. Use __cinit__
instead.


I have no experience with building python modules so I just
substituted __cinit__ for __new__ in the above two places

[gregw@charon pyffmpeg-2.1beta]$ vi pyffmpeg.pyx +808
[gregw@charon pyffmpeg-2.1beta]$ vi pyffmpeg.pyx +1835

This fixes the problem but I just wanted to make sure that was the
"correct" way of doing it ?

Thanks

--
Greg

Bertrand Nouvel

unread,
Apr 3, 2011, 6:24:36 AM4/3/11
to pyff...@googlegroups.com
Hi Greg,

Thanks for the information. This is effectively a bugfix that is required to make 
pyffmpeg with the latest Cython.  A new version of pyffmpeg is being prepared,
and it will include the bugfix for that bug, and I believe other clean-ups and
bugfixes.

Thanks for you email.

Bertrand 

2011/4/2 Greg Wildman <gjwi...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "pyffmpeg" group.
To post to this group, send email to pyff...@googlegroups.com.
To unsubscribe from this group, send email to pyffmpeg+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyffmpeg?hl=en.


Reply all
Reply to author
Forward
0 new messages