Re: Rpm5 will switch to python3 ?

2016-11-27 Thread Per Øyvind Karlsen
original post sent from incorrect address..

2016-11-28 4:14 GMT+01:00 Per Øyvind Karlsen :

> https://github.com/proyvind/rpm5-py3k
> here's the py3k port itself finished, but it depends on too much stuff
> recently introduced for me to use and properly test with rpm 5.4.15,
> updating it in omv-cooker to latest is just a bit too tedious for what I
> feel like right now..
>
> 2016-11-15 21:25 GMT+01:00 Jeffrey Johnson :
>
>>
>> > On Nov 15, 2016, at 7:23 AM, Alexander Kanavin <
>> alexander.kana...@linux.intel.com> wrote:
>> >
>> >>
>> >> Which of those packages is of interest to you?
>> >>
>> >> Offhand, I don’t see any important applications there that MUST have
>> >> rpm-python3.
>> >
>> > The usage case is that Yocto Project is replacing smartpm with dnf.
>> >
>> > Dnf can (still) be configured to use Python 2, but we strongly prefer
>> to use Python 3 from the beginning.
>> >
>>
>> The first step is still to get DNF “working” with RPM5 using python2:
>> there are multiple ports involved.
>>
>> If you expose you git repositories, I can try to help.
>>
>> I have already forked all the relevant repositories and done some of the
>> necessary porting
>> back in August:
>>
>> https://github.com/orgs/rpm5/dashboard
>>
>> Meanwhile, rpm-python3 is just a small piece of a much larger puzzle.
>>
>> Until DNF is ported to use rpm5 (with test cases and coverage),
>> rpm—python3 is
>> a NICETOHAVE answer in search of a question.
>>
>> Functioning DNF with RPM5 is MUST’VE.
>>
>> 73 de Jeff
>>
>> __
>> RPM Package Managerhttp://rpm5.org
>> User Communication List rpm-users@rpm5.org
>>
>
>


Re: Rpm5 will switch to python3 ?

2016-11-15 Thread Jeffrey Johnson

> On Nov 15, 2016, at 7:23 AM, Alexander Kanavin 
>  wrote:
> 
>> 
>> Which of those packages is of interest to you?
>> 
>> Offhand, I don’t see any important applications there that MUST have
>> rpm-python3.
> 
> The usage case is that Yocto Project is replacing smartpm with dnf.
> 
> Dnf can (still) be configured to use Python 2, but we strongly prefer to use 
> Python 3 from the beginning.
> 

The first step is still to get DNF “working” with RPM5 using python2: there are 
multiple ports involved.

If you expose you git repositories, I can try to help.

I have already forked all the relevant repositories and done some of the 
necessary porting
back in August:

https://github.com/orgs/rpm5/dashboard

Meanwhile, rpm-python3 is just a small piece of a much larger puzzle.

Until DNF is ported to use rpm5 (with test cases and coverage), rpm—python3 is
a NICETOHAVE answer in search of a question.

Functioning DNF with RPM5 is MUST’VE.

73 de Jeff

__
RPM Package Managerhttp://rpm5.org
User Communication List rpm-users@rpm5.org


Re: Rpm5 will switch to python3 ?

2016-11-15 Thread Alexander Kanavin

On 11/14/2016 06:07 PM, Jeffrey Johnson wrote:

You were warned:


Meanwhile, no one has tried to compile/use rpm-python with python3.
There’s surely some bugs.


Meanwhile — in order to finish rpm-python3 — there needs to be some
usage case.

On a random Fedora 24 installation, I see the following packages using
rpm-python3:

$ rpm -q --whatrequires rpm-python3
rpmconf-1.0.16-2.fc24.noarch
python3-dnf-1.1.10-1.fc24.noarch
rpmlint-1.9-3.fc24.noarch
setroubleshoot-server-3.3.11-1.fc24.x86_64
mock-1.2.21-1.fc24.noarch

Which of those packages is of interest to you?

Offhand, I don’t see any important applications there that MUST have
rpm-python3.


The usage case is that Yocto Project is replacing smartpm with dnf.

Dnf can (still) be configured to use Python 2, but we strongly prefer to 
use Python 3 from the beginning.


Alex

__
RPM Package Managerhttp://rpm5.org
User Communication List rpm-users@rpm5.org


Re: Rpm5 will switch to python3 ?

2016-11-14 Thread Jeffrey Johnson

> On Nov 14, 2016, at 10:32 AM, Alexander Kanavin 
>  wrote:
> 
>> 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 == _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 == _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 == _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 = _Type;
> |  ^
> 

You were warned:

>> Meanwhile, no one has tried to compile/use rpm-python with python3. 
>> There’s surely some bugs.

Meanwhile — in order to finish rpm-python3 — there needs to be some usage case.

On a random Fedora 24 installation, I see the following packages using 
rpm-python3:

$ rpm -q --whatrequires rpm-python3
rpmconf-1.0.16-2.fc24.noarch
python3-dnf-1.1.10-1.fc24.noarch
rpmlint-1.9-3.fc24.noarch
setroubleshoot-server-3.3.11-1.fc24.x86_64
mock-1.2.21-1.fc24.noarch

Which of those packages is of interest to you?

Offhand, I don’t see any important applications there that MUST have 
rpm-python3.

73 de Jeff



Re: Rpm5 will switch to python3 ?

2016-11-14 Thread Alexander Kanavin

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 == _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 == _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 == _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 = _Type;
|  ^


Regards,
Alex
__
RPM Package Managerhttp://rpm5.org
User Communication List rpm-users@rpm5.org


Re: Rpm5 will switch to python3 ?

2016-09-21 Thread Jeffrey Johnson

> On Sep 21, 2016, at 5:23 AM, Fan Xin  wrote:
> 
> Hi
> 
> I am a Yotco Project user and rpm5 is used in Yocto Project.
> As I known, now rpm5 is dependent on python 2.x.
> 
> I want to know that whether the rpm5 community has a plan to switch to Python 
> 3.x .
> 

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

__
RPM Package Managerhttp://rpm5.org
User Communication List rpm-users@rpm5.org