File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ def pip_main(argv):
105105parser .add_argument ('--extra_pip_args' , action = 'store' ,
106106 help = ('Extra arguments to pass down to pip.' ))
107107
108+ def sort_wheels (whls ):
109+ """Sorts a list of wheels deterministically."""
110+ return sorted (whls , key = lambda w : w .distribution () + '_' + w .version ())
111+
108112def determine_possible_extras (whls ):
109113 """Determines the list of possible "extras" for each .whl
110114
@@ -153,7 +157,7 @@ def is_possible(distro, extra):
153157 return {
154158 whl : [
155159 extra
156- for extra in whl .extras ()
160+ for extra in sorted ( whl .extras () )
157161 if is_possible (whl .distribution (), extra )
158162 ]
159163 for whl in whls
@@ -177,7 +181,7 @@ def list_whls():
177181 if fname .endswith ('.whl' ):
178182 yield os .path .join (root , fname )
179183
180- whls = [ Wheel (path ) for path in list_whls ()]
184+ whls = sort_wheels ( Wheel (path ) for path in list_whls ())
181185 possible_extras = determine_possible_extras (whls )
182186
183187 def repository_name (wheel ):
You can’t perform that action at this time.
0 commit comments