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(
218
218
)
219
219
220
220
if sdist and not common_sdist :
221
- common_sdist = sdist
221
+ common_sdist = struct (
222
+ req = r ,
223
+ sdist = sdist ,
224
+ )
222
225
223
226
target_platforms = env_marker_target_platforms .get (r .requirement_line , r .target_platforms )
224
227
all_platforms .extend (target_platforms )
@@ -238,12 +241,12 @@ def parse_requirements(
238
241
if common_sdist :
239
242
ret_requirements .append (
240
243
struct (
241
- distribution = r .distribution ,
242
- srcs = r .srcs ,
244
+ distribution = common_sdist . req .distribution ,
245
+ srcs = common_sdist . req .srcs ,
243
246
target_platforms = sorted (all_platforms ),
244
- extra_pip_args = r .extra_pip_args ,
247
+ extra_pip_args = common_sdist . req .extra_pip_args ,
245
248
whls = [],
246
- sdist = common_sdist ,
249
+ sdist = common_sdist . sdist ,
247
250
is_exposed = is_exposed ,
248
251
),
249
252
)
Original file line number Diff line number Diff line change @@ -547,8 +547,8 @@ def _test_sdist_different_hashes(env):
547
547
srcs = struct (
548
548
marker = "" ,
549
549
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 " ],
552
552
version = "0.0.1" ,
553
553
),
554
554
target_platforms = ["cp315_linux_x86_64" , "cp315_windows_x86_64" ],
You can’t perform that action at this time.
0 commit comments