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

Fails to build the spec file for the pip module pkginfo #176

Open tuxmaster5000 opened 5 years ago

tuxmaster5000 commented 5 years ago

Call pyp2rpm -o epel7 -s pkginfo fails with:

Traceback (most recent call last): File "/home/foo/.local/bin/pyp2rpm", line 11, in sys.exit(main()) File "/home/foo/.local/lib/python3.4/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/home/foo/.local/lib/python3.4/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/foo/.local/lib/python3.4/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/foo/.local/lib/python3.4/site-packages/click/core.py", line 555, in invoke return callback(args, **kwargs) File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/bin.py", line 210, in main converted = convertor.convert() File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/convertor.py", line 143, in convert data = self.metadata_extractor.extract_data(self.client) File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/metadata_extractors.py", line 94, in inner data = extraction_fce(self) File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/metadata_extractors.py", line 129, in inner data = extraction_fce(self) File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/metadata_extractors.py", line 261, in extract_data data.set_from(self.data_from_archive) File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/metadata_extractors.py", line 517, in data_from_archive archive_data = super(SetupPyMetadataExtractor, self).data_from_archive File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/metadata_extractors.py", line 292, in data_from_archive archive_data['scripts'] = self.scripts File "/home/foo/.local/lib/python3.4/site-packages/pyp2rpm/metadata_extractors.py", line 430, in scripts equal_sign = script.find('=') AttributeError: 'list' object has no attribute 'find'

tuxmaster5000 commented 5 years ago

Using it for other packages will work.

hroncok commented 5 years ago

pkginfo has:

    entry_points={
      'console_scripts': [
        ['pkginfo = pkginfo.commandline:main']
      ]
    },

Yet the docs mention it like this:

    entry_points = {
        'console_scripts': ['funniest-joke=funniest.command_line:main'],
    }

I think this is a bug in pkginfo having 2 nested lists instead of one flat list.

Or is this supposed to work?

tuxmaster5000 commented 5 years ago

I have open an bug report at the developer of pkginfo. So I hope the people there can help us.