fedora-python / pyp2rpm

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

Empty tag: Source0: #118

Closed brianjmurrell closed 7 years ago

brianjmurrell commented 7 years ago

If I create a specfile from a local file the Source0: tag is empty:

$ pyp2rpm -d ~/rpm/ ~/greenlet-0.4.2.zip > ~/rpm/SPECS/python-greenlet.spec
Failed to synchronize cache for repo 'foo', disabling.
$ rpmbuild -bb --define '_sourcedir /home/brian/' ~/rpm/SPECS/python-greenlet.spec
error: line 11: Empty tag: Source0:
$ grep Source0 ~/rpm/SPECS/python-greenlet.spec
Source0:        
irushchyshyn commented 7 years ago

Thanks for reporting this @brianjmurrell .

I would like to clarify though, what is the expected behaviour in this example? I suppose it should be set to the local file name:

Source0: greenlet-0.4.2.zip
brianjmurrell commented 7 years ago

I think so. Or perhaps a pypi name should be derived from the file? Or maybe it should just be an outright error to try to use a local file?

I would think any of those, or perhaps even another solution other than generating a broken specfile.

brianjmurrell commented 7 years ago

Awesome. Thanks!