File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Filter options
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):
105
105
parser .add_argument ('--extra_pip_args' , action = 'store' ,
106
106
help = ('Extra arguments to pass down to pip.' ))
107
107
108
+ def sort_wheels (whls ):
109
+ """Sorts a list of wheels deterministically."""
110
+ return sorted (whls , key = lambda w : w .distribution () + '_' + w .version ())
111
+
108
112
def determine_possible_extras (whls ):
109
113
"""Determines the list of possible "extras" for each .whl
110
114
@@ -153,7 +157,7 @@ def is_possible(distro, extra):
153
157
return {
154
158
whl : [
155
159
extra
156
- for extra in whl .extras ()
160
+ for extra in sorted ( whl .extras () )
157
161
if is_possible (whl .distribution (), extra )
158
162
]
159
163
for whl in whls
@@ -177,7 +181,7 @@ def list_whls():
177
181
if fname .endswith ('.whl' ):
178
182
yield os .path .join (root , fname )
179
183
180
- whls = [ Wheel (path ) for path in list_whls ()]
184
+ whls = sort_wheels ( Wheel (path ) for path in list_whls ())
181
185
possible_extras = determine_possible_extras (whls )
182
186
183
187
def repository_name (wheel ):
You can’t perform that action at this time.
0 commit comments