filetypes.py 571 B

12345678910111213141516
  1. """Filetype information.
  2. """
  3. from pip._internal.utils.typing import MYPY_CHECK_RUNNING
  4. if MYPY_CHECK_RUNNING:
  5. from typing import Tuple
  6. WHEEL_EXTENSION = '.whl'
  7. BZ2_EXTENSIONS = ('.tar.bz2', '.tbz') # type: Tuple[str, ...]
  8. XZ_EXTENSIONS = ('.tar.xz', '.txz', '.tlz',
  9. '.tar.lz', '.tar.lzma') # type: Tuple[str, ...]
  10. ZIP_EXTENSIONS = ('.zip', WHEEL_EXTENSION) # type: Tuple[str, ...]
  11. TAR_EXTENSIONS = ('.tar.gz', '.tgz', '.tar') # type: Tuple[str, ...]
  12. ARCHIVE_EXTENSIONS = (
  13. ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS
  14. )