@@ -856,6 +856,84 @@ git_dep @ git+https://git.server/repo/project@deadbeefdeadbeef
856
856
857
857
_tests .append (_test_simple_get_index )
858
858
859
+ def _test_optimum_sys_platform_extra (env ):
860
+ pypi = _parse_modules (
861
+ env ,
862
+ module_ctx = _mock_mctx (
863
+ _mod (
864
+ name = "rules_python" ,
865
+ parse = [
866
+ _parse (
867
+ hub_name = "pypi" ,
868
+ python_version = "3.15" ,
869
+ requirements_lock = "universal.txt" ,
870
+ ),
871
+ ],
872
+ ),
873
+ read = lambda x : {
874
+ "universal.txt" : """\
875
+ optimum[onnxruntime]==1.17.1 ; sys_platform == 'darwin'
876
+ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
877
+ """ ,
878
+ }[x ],
879
+ ),
880
+ available_interpreters = {
881
+ "python_3_15_host" : "unit_test_interpreter_target" ,
882
+ },
883
+ )
884
+
885
+ pypi .exposed_packages ().contains_exactly ({"pypi" : []})
886
+ pypi .hub_group_map ().contains_exactly ({"pypi" : {}})
887
+ pypi .hub_whl_map ().contains_exactly ({
888
+ "pypi" : {
889
+ "optimum" : {
890
+ "pypi_315_optimum_linux_aarch64_linux_arm_linux_ppc_linux_s390x_linux_x86_64" : [
891
+ whl_config_setting (
892
+ version = "3.15" ,
893
+ target_platforms = [
894
+ "cp315_linux_aarch64" ,
895
+ "cp315_linux_arm" ,
896
+ "cp315_linux_ppc" ,
897
+ "cp315_linux_s390x" ,
898
+ "cp315_linux_x86_64" ,
899
+ ],
900
+ config_setting = None ,
901
+ filename = None ,
902
+ ),
903
+ ],
904
+ "pypi_315_optimum_osx_aarch64_osx_x86_64" : [
905
+ whl_config_setting (
906
+ version = "3.15" ,
907
+ target_platforms = [
908
+ "cp315_osx_aarch64" ,
909
+ "cp315_osx_x86_64" ,
910
+ ],
911
+ config_setting = None ,
912
+ filename = None ,
913
+ ),
914
+ ],
915
+ },
916
+ },
917
+ })
918
+
919
+ pypi .whl_libraries ().contains_exactly ({
920
+ "pypi_315_optimum_linux_aarch64_linux_arm_linux_ppc_linux_s390x_linux_x86_64" : {
921
+ "dep_template" : "@pypi//{name}:{target}" ,
922
+ "python_interpreter_target" : "unit_test_interpreter_target" ,
923
+ "repo" : "pypi_315" ,
924
+ "requirement" : "optimum[onnxruntime-gpu]==1.17.1" ,
925
+ },
926
+ "pypi_315_optimum_osx_aarch64_osx_x86_64" : {
927
+ "dep_template" : "@pypi//{name}:{target}" ,
928
+ "python_interpreter_target" : "unit_test_interpreter_target" ,
929
+ "repo" : "pypi_315" ,
930
+ "requirement" : "optimum[onnxruntime]==1.17.1" ,
931
+ },
932
+ })
933
+ pypi .whl_mods ().contains_exactly ({})
934
+
935
+ _tests .append (_test_optimum_sys_platform_extra )
936
+
859
937
def extension_test_suite (name ):
860
938
"""Create the test suite.
861
939
0 commit comments