@@ -405,6 +405,7 @@ _tests.append(_test_simple_multiple_python_versions)
405405
406406def _test_simple_multiple_platforms_with_extras (env ):
407407 """TODO(hartikainen): Test that reproduces a multi-platform-with-extras issue."""
408+
408409 # This test case is based on my issue where different requirement strings for the same package
409410 # (`jax` vs `jax[cuda12]`) for multiple platforms caused a "duplicate library" error (for details,
410411 # see https://github.com/bazel-contrib/rules_python/issues/2797#issuecomment-3143914644).
@@ -454,33 +455,42 @@ package[extra]==0.7.0 \
454455 )
455456
456457 pypi .exposed_packages ().contains_exactly ({"pypi" : ["package" ]})
458+
457459 # TODO(hartikainen): Check these expectations.
458460 pypi .hub_whl_map ().contains_exactly ({"pypi" : {
459461 "package" : {
460- "pypi_312_package_py3_none_any_62833036 " : [
462+ "pypi_312_package_linux_aarch64 " : [
461463 whl_config_setting (
462- # TODO(hartikainen): I think all these platforms use the same `.whl`
463- # and thus all three platforms should be included in the same
464- # `target_platforms` here?
465- target_platforms = ["cp312_linux_arm64" , "cp312_linux_x86_64" ],
464+ target_platforms = ["cp312_linux_aarch64" ],
465+ version = "3.12" ,
466+ ),
467+ ],
468+ "pypi_312_package_linux_x86_64" : [
469+ whl_config_setting (
470+ target_platforms = ["cp312_linux_x86_64" ],
466471 version = "3.12" ,
467472 ),
468473 ],
469474 },
470475 }})
471476 pypi .whl_libraries ().contains_exactly ({
472- "pypi_312_package_py3_none_any_62833036 " : {
477+ "pypi_312_package_linux_aarch64 " : {
473478 "dep_template" : "@pypi//{name}:{target}" ,
474- "download_only" : True ,
475- "experimental_target_platforms" : ["linux_arm64" , "linux_x86_64" ],
479+ "experimental_target_platforms" : ["linux_aarch64" ],
480+ "filename" : "package-0.7.0-py3-none-any.whl" ,
481+ "python_interpreter_target" : "unit_test_interpreter_target" ,
482+ "requirement" : "package==0.7.0" ,
483+ "sha256" : "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76" ,
484+ "urls" : ["https://example.com/package/package-0.7.0-py3-none-any.whl" ],
485+ },
486+ "pypi_312_package_linux_x86_64" : {
487+ "dep_template" : "@pypi//{name}:{target}" ,
488+ "experimental_target_platforms" : ["linux_x86_64" ],
476489 "filename" : "package-0.7.0-py3-none-any.whl" ,
477490 "python_interpreter_target" : "unit_test_interpreter_target" ,
478- # NOTE(hartikainen): Perhaps this is part of the problem?
479- # This should say `package[extra]==0.7.0` for `linux_x86_64` platform and
480- # `package==0.7.0` for `linux_arm64`
481491 "requirement" : "package[extra]==0.7.0" ,
482492 "sha256" : "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76" ,
483- "urls" : ["https://example.com/package-0.7.0-py3-none-any.whl" ],
493+ "urls" : ["https://example.com/package/package -0.7.0-py3-none-any.whl" ],
484494 },
485495 })
486496 pypi .whl_mods ().contains_exactly ({})
0 commit comments