Skip to content

Commit 22272eb

Browse files
committed
Include extras in whl names in hub builder tests
1 parent e85a39b commit 22272eb

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",
@@ -1124,25 +1124,33 @@ package[extra]==0.7.0 \
11241124
"package": {
11251125
"pypi_312_package_py3_none_any_62833036": [
11261126
whl_config_setting(
1127-
# TODO(hartikainen): The two platforms both use the same `.whl` and
1128-
# are thus included in the same `target_platforms` here.
1129-
target_platforms = ["cp312_linux_aarch64", "cp312_linux_x86_64"],
1127+
target_platforms = ["cp312_linux_aarch64"],
1128+
version = "3.12",
1129+
),
1130+
],
1131+
"pypi_312_package_py3_none_any_62833036_extra": [
1132+
whl_config_setting(
1133+
target_platforms = ["cp312_linux_x86_64"],
11301134
version = "3.12",
11311135
),
11321136
],
11331137
},
11341138
})
11351139
pypi.whl_libraries().contains_exactly({
1136-
# NOTE(hartikainen): The error stems here. We have two different platforms
1137-
# pointing to the same universal wheel, both just with different extras. The key
1138-
# clashes and probably needs the extras to be included in it.
11391140
"pypi_312_package_py3_none_any_62833036": {
11401141
"config_load": "@pypi//:config.bzl",
11411142
"dep_template": "@pypi//{name}:{target}",
11421143
"filename": "package-0.7.0-py3-none-any.whl",
11431144
"python_interpreter_target": "unit_test_interpreter_target",
1144-
# NOTE(hartikainen): This should say `package[extra]==0.7.0` for
1145-
# `linux_x86_64` platform and `package==0.7.0` for `linux_aarch64`
1145+
"requirement": "package==0.7.0",
1146+
"sha256": "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76",
1147+
"urls": ["https://example.com/package/package-0.7.0-py3-none-any.whl"],
1148+
},
1149+
"pypi_312_package_py3_none_any_62833036_extra": {
1150+
"config_load": "@pypi//:config.bzl",
1151+
"dep_template": "@pypi//{name}:{target}",
1152+
"filename": "package-0.7.0-py3-none-any.whl",
1153+
"python_interpreter_target": "unit_test_interpreter_target",
11461154
"requirement": "package[extra]==0.7.0",
11471155
"sha256": "62833036cbaf4641d66ae94c61c0446890a91b2c0d153946583a0ebe04877a76",
11481156
"urls": ["https://example.com/package/package-0.7.0-py3-none-any.whl"],

0 commit comments

Comments
 (0)