appdirs.patch 993 B

1234567891011121314151617181920212223242526272829
  1. diff --git a/src/pip/_vendor/appdirs.py b/src/pip/_vendor/appdirs.py
  2. index ae67001a..2bd39110 100644
  3. --- a/src/pip/_vendor/appdirs.py
  4. +++ b/src/pip/_vendor/appdirs.py
  5. @@ -557,18 +557,14 @@ def _get_win_folder_with_jna(csidl_name):
  6. if system == "win32":
  7. try:
  8. - import win32com.shell
  9. - _get_win_folder = _get_win_folder_with_pywin32
  10. + from ctypes import windll
  11. + _get_win_folder = _get_win_folder_with_ctypes
  12. except ImportError:
  13. try:
  14. - from ctypes import windll
  15. - _get_win_folder = _get_win_folder_with_ctypes
  16. + import com.sun.jna
  17. + _get_win_folder = _get_win_folder_with_jna
  18. except ImportError:
  19. - try:
  20. - import com.sun.jna
  21. - _get_win_folder = _get_win_folder_with_jna
  22. - except ImportError:
  23. - _get_win_folder = _get_win_folder_from_registry
  24. + _get_win_folder = _get_win_folder_from_registry
  25. #---- self test code