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']
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:
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']