File tree 2 files changed +7
-3
lines changed
pipenv/vendor/pythonfinder
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ class PythonVersion(object):
354
354
architecture = attr .ib (default = None ) # type: Optional[str]
355
355
comes_from = attr .ib (default = None ) # type: Optional[PathEntry]
356
356
executable = attr .ib (default = None ) # type: Optional[str]
357
- company = attr .ib (default = "PythonCore" ) # type: Optional[str]
357
+ company = attr .ib (default = None ) # type: Optional[str]
358
358
name = attr .ib (default = None , type = str )
359
359
360
360
def __getattribute__ (self , key ):
Original file line number Diff line number Diff line change @@ -308,7 +308,11 @@ def find_all_python_versions(
308
308
)
309
309
if not isinstance (versions , Iterable ):
310
310
versions = [versions ]
311
- path_list = sorted (versions , key = version_sort , reverse = True )
311
+ # This list has already been mostly sorted on windows, we don't need to reverse it again
312
+ if os .name == "nt" :
313
+ path_list = sorted (versions , key = version_sort )
314
+ else :
315
+ path_list = sorted (versions , key = version_sort , reverse = True )
312
316
path_map = {} # type: Dict[str, PathEntry]
313
317
for path in path_list :
314
318
try :
@@ -317,4 +321,4 @@ def find_all_python_versions(
317
321
resolved_path = path .path .absolute ()
318
322
if not path_map .get (resolved_path .as_posix ()):
319
323
path_map [resolved_path .as_posix ()] = path
320
- return list ( path_map . values ())
324
+ return path_list
You can’t perform that action at this time.
0 commit comments