File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
tests/pypi/parse_requirements Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,10 @@ def parse_requirements(
218218 )
219219
220220 if sdist and not common_sdist :
221- common_sdist = sdist
221+ common_sdist = struct (
222+ req = r ,
223+ sdist = sdist ,
224+ )
222225
223226 target_platforms = env_marker_target_platforms .get (r .requirement_line , r .target_platforms )
224227 all_platforms .extend (target_platforms )
@@ -238,12 +241,12 @@ def parse_requirements(
238241 if common_sdist :
239242 ret_requirements .append (
240243 struct (
241- distribution = r .distribution ,
242- srcs = r .srcs ,
244+ distribution = common_sdist . req .distribution ,
245+ srcs = common_sdist . req .srcs ,
243246 target_platforms = sorted (all_platforms ),
244- extra_pip_args = r .extra_pip_args ,
247+ extra_pip_args = common_sdist . req .extra_pip_args ,
245248 whls = [],
246- sdist = common_sdist ,
249+ sdist = common_sdist . sdist ,
247250 is_exposed = is_exposed ,
248251 ),
249252 )
Original file line number Diff line number Diff line change @@ -547,8 +547,8 @@ def _test_sdist_different_hashes(env):
547547 srcs = struct (
548548 marker = "" ,
549549 requirement = "foo==0.0.1" ,
550- requirement_line = "foo==0.0.1 --hash=sha256:deadbeef --hash=sha256:cafebabe" ,
551- shas = ["cafebabe" , "deadbeef " ],
550+ requirement_line = "foo==0.0.1 --hash=sha256:deadbaaf --hash=sha256:cafebabe" ,
551+ shas = ["cafebabe" , "deadbaaf " ],
552552 version = "0.0.1" ,
553553 ),
554554 target_platforms = ["cp315_linux_x86_64" , "cp315_windows_x86_64" ],
You can’t perform that action at this time.
0 commit comments