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

Compatible release operator ~= in dependencies yield an RPM error #182

Closed mikedep333 closed 4 years ago

mikedep333 commented 5 years ago

After running pyp2rpm -s pulp_file, I got this line:

BuildRequires: python3dist(pulpcore-plugin) ~= 0.1rc1 rpmbuild -bs failed with: error: line 15: Dependency tokens must begin with alpha-numeric, '_' or '/': BuildRequires: python3dist(pulpcore-plugin) ~= 0.1rc1

I worked around this manually by changing ~= to >=

hroncok commented 5 years ago

Another elif in here might solve this.

https://github.com/fedora-python/pyp2rpm/blob/438a987c4221f4590961d6bf449dc0b6d3c31266/pyp2rpm/dependency_parser.py#L28-L37

What is the exact meaning of ~=?

hroncok commented 5 years ago

Also not thet in this case, a proper 0.1 release won't be >= 0.1rc1, given the way how rpm sorts:

$ rpmdev-vercmp 0.1 0.1rc1
0.1 < 0.1rc1
gordonmessmer commented 4 years ago

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