File tree Expand file tree Collapse file tree 4 files changed +37
-12
lines changed Expand file tree Collapse file tree 4 files changed +37
-12
lines changed Original file line number Diff line number Diff line change @@ -557,18 +557,14 @@ def _get_win_folder_with_jna(csidl_name):
557557
558558if system == "win32" :
559559 try :
560- import win32com . shell
561- _get_win_folder = _get_win_folder_with_pywin32
560+ from ctypes import windll
561+ _get_win_folder = _get_win_folder_with_ctypes
562562 except ImportError :
563563 try :
564- from ctypes import windll
565- _get_win_folder = _get_win_folder_with_ctypes
564+ import com . sun . jna
565+ _get_win_folder = _get_win_folder_with_jna
566566 except ImportError :
567- try :
568- import com .sun .jna
569- _get_win_folder = _get_win_folder_with_jna
570- except ImportError :
571- _get_win_folder = _get_win_folder_from_registry
567+ _get_win_folder = _get_win_folder_from_registry
572568
573569
574570#---- self test code
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -144,9 +144,11 @@ def update_stubs(ctx):
144144
145145 print ("[vendoring.update_stubs] Add mypy stubs" )
146146
147- # Some projects need stubs other than a simple <name>.pyi
148147 extra_stubs_needed = {
149- "six" : ["six.__init__" , "six.moves" ]
148+ # Some projects need stubs other than a simple <name>.pyi
149+ "six" : ["six.__init__" , "six.moves" ],
150+ # Some projects should not have stubs coz they're single file modules
151+ "appdirs" : [],
150152 }
151153
152154 for lib in vendored_libs :
Original file line number Diff line number Diff line change 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+
7+ if system == "win32":
8+ try:
9+ - import win32com.shell
10+ - _get_win_folder = _get_win_folder_with_pywin32
11+ + from ctypes import windll
12+ + _get_win_folder = _get_win_folder_with_ctypes
13+ except ImportError:
14+ try:
15+ - from ctypes import windll
16+ - _get_win_folder = _get_win_folder_with_ctypes
17+ + import com.sun.jna
18+ + _get_win_folder = _get_win_folder_with_jna
19+ except ImportError:
20+ - try:
21+ - import com.sun.jna
22+ - _get_win_folder = _get_win_folder_with_jna
23+ - except ImportError:
24+ - _get_win_folder = _get_win_folder_from_registry
25+ + _get_win_folder = _get_win_folder_from_registry
26+
27+
28+ #---- self test code
You can’t perform that action at this time.
0 commit comments