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

tuple is not a list error #59

Closed glensc closed 8 years ago

glensc commented 8 years ago

got such unuseful error:

[pyp2rpm (master)⚡] ➔ ./mybin.py dirsync
error: ('six',) is not a list
glensc commented 8 years ago

besides the error, some backtrace would had been useful to even figure out where to insert pprint lines... there's some logger in pyp2rpm/bin.py, but can't figure out how to tune it via commandline arguments.

glensc commented 8 years ago

i think the cause is this line:

https://bitbucket.org/tkhyn/dirsync/src/8993b29491934c0eb0738a33705a587b64aa2cc5/setup.py?at=v2.2.2&fileviewer=file-view-default#setup.py-53

hroncok commented 8 years ago

Problem: https://github.com/fedora-python/pyp2rpm/blob/d2918ca0a13bfa63c36b7ee7d3c247407e14344e/pyp2rpm/extract_distribution.py#L67

glensc commented 8 years ago

looks like the problem is not trailing comma, but it just doesn't accept tupes?

➔ python
Python 2.7.11 (default, May  4 2016, 09:58:31) 
[GCC 5.3.0 20151204 (release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> a=('a')
>>> type(a)
<type 'str'>

>>> a=('a',)
>>> type(a)
<type 'tuple'>

>>> a=('a','b')
>>> type(a)
<type 'tuple'>
>>> 
hroncok commented 8 years ago

Yes. And I think it could even be a generator and such.

hroncok commented 8 years ago

Actually https://github.com/fedora-python/pyp2rpm/pull/36#discussion_r56307919