Python 3.2a1 in rawhide

David Malcolm dmalcolm at redhat.com
Tue Aug 24 00:16:19 UTC 2010


On Sun, 2010-08-22 at 19:16 -0500, Jeffrey Ollie wrote:
> On Sat, Aug 21, 2010 at 5:48 PM, David Malcolm <dmalcolm at redhat.com> wrote:
> > I just built Python 3.2a1 into rawhide:
> >  http://koji.fedoraproject.org/koji/buildinfo?buildID=191382
> > so the meaning of "python3" in rawhide just jumped from Python 3.1 to
> > Python 3.2
> 
> I tried rebuilding python-lxml, but I ran into this error:
> 
> gcc -pthread -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC
> -I/usr/include/libxml2 -I/usr/include/python3.2 -c
> src/lxml/lxml.etree.c -o
> build/temp.linux-x86_64-3.2/src/lxml/lxml.etree.o -w
> src/lxml/lxml.etree.c: In function '__Pyx_Method_ClassMethod':
> src/lxml/lxml.etree.c:144925:44: error: 'PyMethodDescrObject' has no
> member named 'd_type'
> error: command 'gcc' failed with exit status 1
> 
> The full build log can be found here:
> 
> http://koji.fedoraproject.org/koji/getfile?taskID=2417411&name=build.log
> 
> I'm not familiar enough with C extensions in Python to find the fix
> quickly, unless there's a FAQ somewhere with common problems when
> porting between Python 2 and Python 3...

That .c code is generated by Cython.

http://bugs.gentoo.org/show_bug.cgi?id=318923 says that this is fixed in
cython-0.12

Fedora 14 contains 0.12.1-5, so rawhide should as well.

A suggested fix (caveat: not tested): ensure that the python-lxml.spec
has a
  BuildRequires: Cython >= 0.12
and delete the .c file in the %prep, to ensure that Cython regenerates
it during the build.

Does this fix it?

Dave



More information about the devel mailing list