File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -219,15 +219,14 @@ def parse_requirements(
219219
220220 if sdist :
221221 sha = sdist .sha256
222- if sha not in sdists_by_sha :
223- sdists_by_sha [sha ] = struct (
224- distribution = r .distribution ,
225- srcs = r .srcs ,
226- extra_pip_args = r .extra_pip_args ,
227- sdist = sdist ,
228- platforms = [],
229- )
230- sdists_by_sha [sha ].platforms .extend (target_platforms )
222+ sdist_info = sdists_by_sha .setdefault (sha , struct (
223+ distribution = r .distribution ,
224+ srcs = r .srcs ,
225+ extra_pip_args = r .extra_pip_args ,
226+ sdist = sdist ,
227+ platforms = [],
228+ ))
229+ sdist_info .platforms .extend (target_platforms )
231230
232231 if len (whls ) == 0 :
233232 continue
@@ -244,7 +243,7 @@ def parse_requirements(
244243 ),
245244 )
246245
247- for sha , sdist_info in sdists_by_sha .items ():
246+ for sdist_info in sdists_by_sha .values ():
248247 ret_requirements .append (
249248 struct (
250249 distribution = sdist_info .distribution ,
You can’t perform that action at this time.
0 commit comments