File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,15 @@ def _impl(ctx):
2727    env ["sys_platform" ] =  ctx .attr .sys_platform 
2828    env ["platform_machine" ] =  ctx .attr .platform_machine 
2929
30-     # todo: add PyRuntimeInfo.platform_python_implementation 
31-     # The values are slightly different to implementation_name 
32-     env ["platform_python_implementation" ] =  runtime .implementation_name 
30+     # todo: maybe add PyRuntimeInfo.platform_python_implementation? 
31+     # The values are slightly different to implementation_name. 
32+     # However, digging through old PEPs, it looks like 
33+     # platform.python_implementation is legacy, and sys.implementation.name 
34+     # "replaced" it. Can probably just special case this. 
35+     platform_python_impl  =  runtime .implementation_name 
36+     if  platform_python_impl  ==  "cpython" :
37+         platform_python_impl  =  "CPython" 
38+     env ["platform_python_implementation" ] =  platform_python_impl 
3339    env ["platform_release" ] =  ctx .attr ._platform_release_config_flag [BuildSettingInfo ].value 
3440    env ["platform_system" ] =  ctx .attr .platform_system 
3541    env ["platform_version" ] =  ctx .attr ._platform_version_config_flag [BuildSettingInfo ].value 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments