Skip to content

Commit 018f135

Browse files
committed
Include extras in whl names in hub builder tests
1 parent da78467 commit 018f135

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

tests/pypi/hub_builder/hub_builder_tests.bzl

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
943943
pypi.group_map().contains_exactly({})
944944
pypi.whl_map().contains_exactly({
945945
"optimum": {
946-
"pypi_315_optimum_linux_aarch64_linux_x86_64_linux_x86_64_freethreaded": [
946+
"pypi_315_optimum_linux_aarch64_linux_x86_64_linux_x86_64_freethreaded_onnxruntime-gpu": [
947947
whl_config_setting(
948948
version = "3.15",
949949
target_platforms = [
@@ -953,7 +953,7 @@ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
953953
],
954954
),
955955
],
956-
"pypi_315_optimum_osx_aarch64": [
956+
"pypi_315_optimum_osx_aarch64_onnxruntime": [
957957
whl_config_setting(
958958
version = "3.15",
959959
target_platforms = [
@@ -964,13 +964,13 @@ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
964964
},
965965
})
966966
pypi.whl_libraries().contains_exactly({
967-
"pypi_315_optimum_linux_aarch64_linux_x86_64_linux_x86_64_freethreaded": {
967+
"pypi_315_optimum_linux_aarch64_linux_x86_64_linux_x86_64_freethreaded_onnxruntime-gpu": {
968968
"config_load": "@pypi//:config.bzl",
969969
"dep_template": "@pypi//{name}:{target}",
970970
"python_interpreter_target": "unit_test_interpreter_target",
971971
"requirement": "optimum[onnxruntime-gpu]==1.17.1",
972972
},
973-
"pypi_315_optimum_osx_aarch64": {
973+
"pypi_315_optimum_osx_aarch64_onnxruntime": {
974974
"config_load": "@pypi//:config.bzl",
975975
"dep_template": "@pypi//{name}:{target}",
976976
"python_interpreter_target": "unit_test_interpreter_target",
@@ -1028,15 +1028,15 @@ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
10281028
pypi.group_map().contains_exactly({})
10291029
pypi.whl_map().contains_exactly({
10301030
"optimum": {
1031-
"pypi_315_optimum_mylinuxx86_64": [
1031+
"pypi_315_optimum_mylinuxx86_64_onnxruntime-gpu": [
10321032
whl_config_setting(
10331033
version = "3.15",
10341034
target_platforms = [
10351035
"cp315_mylinuxx86_64",
10361036
],
10371037
),
10381038
],
1039-
"pypi_315_optimum_myosxaarch64": [
1039+
"pypi_315_optimum_myosxaarch64_onnxruntime": [
10401040
whl_config_setting(
10411041
version = "3.15",
10421042
target_platforms = [
@@ -1047,13 +1047,13 @@ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
10471047
},
10481048
})
10491049
pypi.whl_libraries().contains_exactly({
1050-
"pypi_315_optimum_mylinuxx86_64": {
1050+
"pypi_315_optimum_mylinuxx86_64_onnxruntime-gpu": {
10511051
"config_load": "@pypi//:config.bzl",
10521052
"dep_template": "@pypi//{name}:{target}",
10531053
"python_interpreter_target": "unit_test_interpreter_target",
10541054
"requirement": "optimum[onnxruntime-gpu]==1.17.1",
10551055
},
1056-
"pypi_315_optimum_myosxaarch64": {
1056+
"pypi_315_optimum_myosxaarch64_onnxruntime": {
10571057
"config_load": "@pypi//:config.bzl",
10581058
"dep_template": "@pypi//{name}:{target}",
10591059
"python_interpreter_target": "unit_test_interpreter_target",
@@ -1121,25 +1121,33 @@ package[extra]==0.7.0 --hash=sha256:62833036cbaf4641d66ae94c61c0446890a91b2c0d15
11211121
"package": {
11221122
"pypi_312_package_py3_none_any_62833036": [
11231123
whl_config_setting(
1124-
# TODO(hartikainen): The two platforms both use the same `.whl` and
1125-
# are thus included in the same `target_platforms` here.
1126-
target_platforms = ["cp312_linux_aarch64", "cp312_linux_x86_64"],
1124+
target_platforms = ["cp312_linux_aarch64"],
1125+
version = "3.12",
1126+
),
1127+
],
1128+
"pypi_312_package_py3_none_any_62833036_extra": [
1129+
whl_config_setting(
1130+
target_platforms = ["cp312_linux_x86_64"],
11271131
version = "3.12",
11281132
),
11291133
],
11301134
},
11311135
})
11321136
pypi.whl_libraries().contains_exactly({
1133-
# NOTE(hartikainen): The error stems here. We have two different platforms
1134-
# pointing to the same universal wheel, both just with different extras. The key
1135-
# clashes and probably needs the extras to be included in it.
11361137
"pypi_312_package_py3_none_any_62833036": {
11371138
"config_load": "@pypi//:config.bzl",
11381139
"dep_template": "@pypi//{name}:{target}",
11391140
"filename": "package-0.7.0-py3-none-any.whl",
11401141
"python_interpreter_target": "unit_test_interpreter_target",
1141-
# NOTE(hartikainen): This should say `package[extra]==0.7.0` for
1142-
# `linux_x86_64` platform and `package==0.7.0` for `linux_aarch64`
1142+
"requirement": "package==0.7.0",
1143+
"sha256": "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76",
1144+
"urls": ["https://example.com/package/package-0.7.0-py3-none-any.whl"],
1145+
},
1146+
"pypi_312_package_py3_none_any_62833036_extra": {
1147+
"config_load": "@pypi//:config.bzl",
1148+
"dep_template": "@pypi//{name}:{target}",
1149+
"filename": "package-0.7.0-py3-none-any.whl",
1150+
"python_interpreter_target": "unit_test_interpreter_target",
11431151
"requirement": "package[extra]==0.7.0",
11441152
"sha256": "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76",
11451153
"urls": ["https://example.com/package/package-0.7.0-py3-none-any.whl"],

0 commit comments

Comments
 (0)