Re: [PATCH] Use rpm Python library for parsing version and release info.

2014-09-23 Thread Matěj Cepl
On 2014-09-23, 19:25 GMT, Bram Moolenaar wrote: > Have you tried contacting the maintainer, Igor Gnatenko? Ouch ... I have completely missed that the file has a maintainer. I am sorry, Igor. What do you think about my attempt? (Whole thread is available at http://thread.gmane.org/gmane.editors.

Re: [PATCH] Use rpm Python library for parsing version and release info.

2014-09-23 Thread Bram Moolenaar
Matěj Cepl wrote: > With the rising complexity of our spec files, I get more to the > situations when spec.vim is not able to parse the spec file > properly and doesn't generate verrel properly. > > However, we have rpm-python library in Fedora/RHEL/SUSE, which should be > able to parse anything

Re: [PATCH] Use rpm Python library for parsing version and release info.

2014-09-23 Thread Matěj Cepl
> Sounds good, but does this work for everybody? I would like > to hear from users, both with and without Python. No weird > error messages in some environment? I know it is a little bit pervert to revive this almost two year old zombie, but let me try. So, what is missing from my patch fixing

[PATCH] Use rpm Python library for parsing version and release info.

2014-09-23 Thread Matěj Cepl
From: Matěj Cepl With the rising complexity of our spec files, I get more to the situations when spec.vim is not able to parse the spec file properly and doesn't generate verrel properly. However, we have rpm-python library in Fedora/RHEL/SUSE, which should be able to parse anything valid in any

Re: [PATCH] Use rpm Python library for parsing version and release info.

2013-10-16 Thread ZyX
> No. They are local to s:GetRelVer. Only. > > It is not python, there are no closures. Function cannot access variables > from the other function unless they are explicitly passed. Err. With python closures you will not get such an effect: function is defined outside of the scope where “a” exi

Re: [PATCH] Use rpm Python library for parsing version and release info.

2013-10-16 Thread ZyX
> They do, because s:GetRelVer() is called inside of > s:SpecChangelog() function so they are local to that function. No. They are local to s:GetRelVer. Only. It is not python, there are no closures. Function cannot access variables from the other function unless they are explicitly passed. >

Re: [PATCH] Use rpm Python library for parsing version and release info.

2013-10-16 Thread ZyX
On Wednesday, October 16, 2013 10:56:00 PM UTC+4, ZyX wrote: > > They do, because s:GetRelVer() is called inside of > > s:SpecChangelog() function so they are local to that function. > > No. They are local to s:GetRelVer. Only. > > It is not python, there are no closures. Function cannot access

[PATCH] Use rpm Python library for parsing version and release info.

2013-10-16 Thread Matěj Cepl
On 2013-10-02, 14:33 GMT, ZyX wrote: > 1. Function s:GetRelVer does not give any error messages. > 2. Yet it does nothing. > > Not sure whether this behavior is fine. It shouldn't matter. s:GetRelVer() is called on line 97, i.e., after ver and rel should be set as best as we can set it without usi

Re: [PATCH] Use rpm Python library for parsing version and release info.

2013-10-02 Thread ZyX
> Well, I have covered all my code with > > if has('python') > endif > > so I hoped that it should be harmless for anybody without Python > support. Seriously, what could get wrong? I see except ImportError: pass . This definitely means that if `rpm` python package is no

Re: [PATCH] Use rpm Python library for parsing version and release info.

2013-10-01 Thread Matěj Cepl
On 2013-10-01, 18:08 GMT, Bram Moolenaar wrote: > Sounds good, but does this work for everybody? I would like to hear > from users, both with and without Python. No weird error messages in > some environment? Well, I have covered all my code with if has('python') endif so I hoped tha

Re: [PATCH] Use rpm Python library for parsing version and release info.

2013-10-01 Thread Bram Moolenaar
Matěj Cepl wrote: > With the rising complexity of our spec files, I get more to the > situations when spec.vim is not able to parse the spec file > properly and doesn't generate verrel properly. > > However, we have rpm-python library in Fedora, which should be > able to parse anything valid in

[PATCH] Use rpm Python library for parsing version and release info.

2013-10-01 Thread Matěj Cepl
With the rising complexity of our spec files, I get more to the situations when spec.vim is not able to parse the spec file properly and doesn't generate verrel properly. However, we have rpm-python library in Fedora, which should be able to parse anything valid in any SPEC file. This patches addi