RPM Community Forums

Mailing List Message of <rpm-users>

Re: Rpm5 will switch to python3 ?

From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Date: Mon 14 Nov 2016 - 16:32:14 CET
Message-ID: <44b0db89-2f96-5c92-e40e-ece7ac1fcfcc@linux.intel.com>
> rpm-python was converted to python3 (and generally blue-printed against
> the rpm.org python module) at least 1 year ago afaik.
>
> Meanwhile, no one has tried to compile/use rpm-python with python3. There’s surely some bugs.
>
> hth
>
> 73 de Jeff

I have tried this just now, and unfortunately I am getting compile 
errors when trying to build against Python 3 (this is an excerpt, the 
whole thing is longer):

| ../../rpm-5.4.15/python/rpmfts-py.c: In function ‘rpmfts_debug’:
| ../../rpm-5.4.15/python/rpmfts-py.c:79:57: error: ‘rpmftsObject {aka 
struct rpmftsObject_s}’ has no member named ‘ob_refcnt’
|   fprintf(stderr, " %u %d ftsp %p fts %p\n", (unsigned) s->ob_refcnt, 
s->active, s->ftsp, s->fts);
|                                                          ^~
| ../../rpm-5.4.15/python/rpmfts-py.c: At top level:
| ../../rpm-5.4.15/python/rpmfts-py.c:504:3: error: ‘cmpfunc’ undeclared 
here (not in a function)
|   (cmpfunc)0,   /* tp_compare */
|    ^~~~~~~
| ../../rpm-5.4.15/python/rpmfts-py.c:504:11: error: expected ‘}’ before 
numeric constant
|   (cmpfunc)0,   /* tp_compare */
|            ^
| ../../rpm-5.4.15/python/rpmdebug-py.c: In function ‘lbl’:
| ../../rpm-5.4.15/python/rpmdebug-py.c:38:24: error: ‘PyBuffer_Type’ 
undeclared (first use in this function)
|      if (o->ob_type == &PyBuffer_Type) return "Buffer";
|                         ^~~~~~~~~~~~~
| ../../rpm-5.4.15/python/rpmdebug-py.c:38:24: note: each undeclared 
identifier is reported only once for each function it appears in
| ../../rpm-5.4.15/python/rpmdebug-py.c:40:24: error: ‘PyCObject_Type’ 
undeclared (first use in this function)
|      if (o->ob_type == &PyCObject_Type) return "CObject";
|                         ^~~~~~~~~~~~~~
| ../../rpm-5.4.15/python/rpmdebug-py.c:42:24: error: ‘PyClass_Type’ 
undeclared (first use in this function)
|      if (o->ob_type == &PyClass_Type) return "Class";
|                         ^~~~~~~~~~~~
| ../../rpm-5.4.15/python/rpmmodule.c:460:13: error: ‘PyTypeObject {aka 
struct _typeobject}’ has no member named ‘ob_type’; did you mean ‘ob_base’?
|      hdr_Type.ob_type = &PyType_Type;
|              ^


Regards,
Alex
Received on Mon Nov 14 16:38:55 2016
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.