Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Igor Gnatenko
Merged #1015 into master. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#event-3220830516___ Rpm-maint mailing list Rpm-mai

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
Squashed. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-611878617___ Rpm-maint mailing list Rpm-maint@lists.r

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Igor Gnatenko
Please squash commits and I'll merge it -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-611872077___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Igor Gnatenko
@ignatenkobrain approved this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#pullrequestreview-391260827_

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
I removed one more instance of stripping ".0" that doesn't have an effect on the output. This one when printing provides. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
@gordonmessmer pushed 1 commit. e95e3bc68257d81cc5122079de308e6a96ba4bf9 Leave trailing .0 in the version until the convert function is called. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015/file

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread torsava
@torsava approved this pull request. Code looks good, tests are passing. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#pullrequestreview-391203820_

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread torsava
> I've pushed a change that should resolve the issues with trailing .0 versions. And now all tests pass! +1 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecommen

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
I've pushed a change that should resolve the issues with trailing .0 versions. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-611775730___

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
@gordonmessmer pushed 1 commit. 6da249c4ca8731e5b9f7722924b855500798c2b2 Leave trailing .0 in the version until the convert function is called. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015/file

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread torsava
@gordonmessmer As for my tests, I'm preparing a few changes to pythondistdeps.py, so I've added tests as well. The PR is still WIP. https://github.com/torsava/rpm/pull/1 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread torsava
> This change incorporates code from > https://github.com/gordonmessmer/pyreq2rpm/ which has a test suite of its own. That's exactly where I took my test data. I have tested your PR and 84 out of 86 tests passed! These are the only 2 issues: 1. Input: foobar4~=2.0 Expected output: (python3.

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
I'd be happy to help fill those tests out. @torsava let me know where your work is at now, if you'd like. This change incorporates code from https://github.com/gordonmessmer/pyreq2rpm/ which has a test suite of its own. -- You are receiving this because you are subscribed to this thread. Re

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread torsava
> It would be nice to have the tests for these... But from the first glance > this looks good to me. I'm actually writing a test suite for `scripts/pythondistdeps`, I'll report soon with the results. -- You are receiving this because you are subscribed to this thread. Reply to this email direc

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Igor Gnatenko
It would be nice to have the tests for these... But from the first glance this looks good to me. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-611392744

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-04-09 Thread Gordon Messmer
Please let me know if this PR needs any additional changes. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-611381277__

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-03-23 Thread Gordon Messmer
Rebased. Probably ought to have done that regardless. :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-602657283___

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-03-23 Thread Panu Matilainen
It's failing in CI due to the following warning/error: > macro.c: In function 'doFoo': macro.c:1211:2: error: 'sprintf' argument 3 may overlap destination object 'buf' [-Werror=restrict] 1211 | sprintf(b, "file%s.file", buf); | ^~ macro.c:1074:11: note: destin

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-03-22 Thread Gordon Messmer
@gordonmessmer pushed 1 commit. 2d103575f57baca8e8d08dd032a4b2054b7fcb25 scripts/pythondistdeps: Improved python version and operator handling. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015/file

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-02-01 Thread Gordon Messmer
gordonmessmer commented on this pull request. > +else: +rpm_epoch = '' +while self.version[-1] == 0: +self.version.pop() +rpm_version = '.'.join(str(x) for x in self.version) +if self.pre: +rpm_suffix = '~%s' % ''.join(str(x) fo

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-02-01 Thread Gordon Messmer
@gordonmessmer pushed 1 commit. 12100cc343050ab69048796156bcc46d6fcdde97 scripts/pythondistdeps: Improved python version and operator handling. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015/file

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-31 Thread Gordon Messmer
gordonmessmer commented on this pull request. > +version_id = version_id[:-2] +version = RpmVersion(version_id) +lower_version = RpmVersion(version_id).increment() +else: +version = RpmVersion(version_id) +lower_version = version +return '(%s < %s

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-27 Thread Gordon Messmer
gordonmessmer commented on this pull request. > +version_id = version_id[:-2] +version = RpmVersion(version_id) +lower_version = RpmVersion(version_id).increment() +else: +version = RpmVersion(version_id) +lower_version = version +return '(%s < %s

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-22 Thread Gordon Messmer
gordonmessmer commented on this pull request. > +version_id = version_id[:-2] +version = RpmVersion(version_id) +lower_version = RpmVersion(version_id).increment() +else: +version = RpmVersion(version_id) +lower_version = version +return '(%s < %s

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-22 Thread Gordon Messmer
gordonmessmer commented on this pull request. > +else: +rpm_epoch = '' +while self.version[-1] == 0: +self.version.pop() +rpm_version = '.'.join(str(x) for x in self.version) +if self.pre: +rpm_suffix = '~%s' % ''.join(str(x) fo

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-22 Thread Miro Hrončok
hroncok commented on this pull request. > +version_id = version_id[:-2] +version = RpmVersion(version_id) +lower_version = RpmVersion(version_id).increment() +else: +version = RpmVersion(version_id) +lower_version = version +return '(%s < %s or %s

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-22 Thread Miro Hrončok
hroncok commented on this pull request. > +else: +rpm_epoch = '' +while self.version[-1] == 0: +self.version.pop() +rpm_version = '.'.join(str(x) for x in self.version) +if self.pre: +rpm_suffix = '~%s' % ''.join(str(x) for x in

Re: [Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-22 Thread Miro Hrončok
Thank you @gordonmessmer! I'll check out the code, but the results look promising. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1015#issuecomment-577084086__

[Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Improved python version and operator handling. (#1015)

2020-01-21 Thread Gordon Messmer
This change handles a number of additional quirks in converting python packaging requirement expressions to rpm, including handling .* in various operators and handling pre and post releases. For example, comparing the output of "pythondistdeps.py -R" for molecule before and after this patch: