@@ -26,7 +26,6 @@ def _mock_mctx(*modules, environ = {}, read = None):
26
26
return struct (
27
27
os = struct (
28
28
environ = environ ,
29
- path = str ,
30
29
name = "unittest" ,
31
30
arch = "exotic" ,
32
31
),
@@ -275,6 +274,14 @@ torch==2.4.1 ; platform_machine != 'x86_64' \
275
274
"python_3_15_host" : "unit_test_interpreter_target" ,
276
275
},
277
276
minor_mapping = {"3.15" : "3.15.19" },
277
+ evaluate_markers = lambda _ , requirements , ** __ : {
278
+ key : [
279
+ platform
280
+ for platform in platforms
281
+ if ("x86_64" in platform and "platform_machine ==" in key ) or ("x86_64" not in platform and "platform_machine !=" in key )
282
+ ]
283
+ for key , platforms in requirements .items ()
284
+ },
278
285
)
279
286
280
287
pypi .exposed_packages ().contains_exactly ({"pypi" : ["torch" ]})
@@ -399,6 +406,15 @@ torch==2.4.1+cpu ; platform_machine == 'x86_64' \
399
406
},
400
407
minor_mapping = {"3.12" : "3.12.19" },
401
408
simpleapi_download = mocksimpleapi_download ,
409
+ evaluate_markers = lambda _ , requirements , ** __ : {
410
+ # todo once 2692 is merged, this is going to be easier to test.
411
+ key : [
412
+ platform
413
+ for platform in platforms
414
+ if ("x86_64" in platform and "platform_machine ==" in key ) or ("x86_64" not in platform and "platform_machine !=" in key )
415
+ ]
416
+ for key , platforms in requirements .items ()
417
+ },
402
418
)
403
419
404
420
pypi .exposed_packages ().contains_exactly ({"pypi" : ["torch" ]})
@@ -858,6 +874,14 @@ optimum[onnxruntime-gpu]==1.17.1 ; sys_platform == 'linux'
858
874
"python_3_15_host" : "unit_test_interpreter_target" ,
859
875
},
860
876
minor_mapping = {"3.15" : "3.15.19" },
877
+ evaluate_markers = lambda _ , requirements , ** __ : {
878
+ key : [
879
+ platform
880
+ for platform in platforms
881
+ if ("darwin" in key and "osx" in platform ) or ("linux" in key and "linux" in platform )
882
+ ]
883
+ for key , platforms in requirements .items ()
884
+ },
861
885
)
862
886
863
887
pypi .exposed_packages ().contains_exactly ({"pypi" : []})
0 commit comments