fedora-python / pyp2rpm

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

pyp2rpm fails when name of the pypi package conflicts with file/dir in actual dir #20

Closed rkuska closed 8 years ago

rkuska commented 9 years ago

Pyp2rpm no more depends on user providing switches to indicate if package should be taken from pypi or is located on disk yet the logic to discover the origin of package is very vague.

Currently we only check if the argument provided is a valid path, consider this:

> $ ls
Django
> $ pyp2rpm Django
[Errno 21] Is a directory: 'Django'

So we should check if the argument provided is not a dir and if it ends with one of known archive suffixes ['.egg', '.zip', '.whl', '.tar', '.gz', '.bz2']