fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
123 stars 39 forks source link

Use the lastest stable version of the package by default #141

Closed mcyprian closed 4 years ago

mcyprian commented 6 years ago

When I run pyp2rpm Django without -v switch. Spec file for alpha version 2.0a1 is generated. I guess alpha/beta versions should be ignored. Django version 1.11.6 should be used in this case. Do you agree @irushchyshyn @hroncok?

hroncok commented 6 years ago

Agreed (if stable version exists). Also, --pre might be implemented.

gordonmessmer commented 4 years ago

It looks like pip decides whether a release is a pre-release by checking for ['a', 'b', 'c', 'rc', 'dev'] in a version number:

https://github.com/pypa/pip/blob/master/src/pip/_vendor/distlib/version.py

I'll work out how many parts of that need to be copied out for this feature. It might be just NormalizedVersion.is_prerelease...

gordonmessmer commented 4 years ago

This should be resolved in v.3.3.4. Please re-open if you can reproduce the issue.