3 ms·
I thought import names and PyPI names are not always equal, thus this can not work reliably, right?
by sean_pedersen 2y ago
I thought import names and PyPI names are not always equal, thus this can not work reliably, right?
- jonathrg 2y agoIt uses this file which maps import names to package names, but it's only 1152 packages and I'm not sure how it was generated. https://github.com/bndr/pipreqs/blob/master/pipreqs/mapping https://github.com/bndr/pipreqs/blob/master/pipreqs/mapping
- quietbritishjim 2y agoIn fairness that only seems to list those packages where the import name doesn't match the package name (e.g., it doesn't include numpy) so its overall coverage is a lot larger than that.
- deleted 2y ago[deleted]
- qwerty1793 2y agoEven worse, there are some different PyPI packages with the same import name. For example, `import snappy` is probably referring to the compression library https://pypi.org/project/python-snappy/ https://pypi.org/project/python-snappy/ but it could be this maths package https://pypi.org/project/snappy/ https://pypi.org/project/snappy/