File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,11 @@ def _python_impl(module_ctx):
228228        kwargs .update (py .config .kwargs .get (toolchain_info .python_version , {}))
229229        kwargs .update (py .config .kwargs .get (full_python_version , {}))
230230        kwargs .update (py .config .default )
231-         python_register_toolchains (name  =  toolchain_info .name , ** kwargs )
231+         python_register_toolchains (
232+             name  =  toolchain_info .name ,
233+             _internal_bzlmod_toolchain_call  =  True ,
234+             ** kwargs 
235+         )
232236
233237    # Create the pythons_hub repo for the interpreter meta data and the 
234238    # the various toolchains. 
Original file line number Diff line number Diff line change @@ -75,9 +75,8 @@ def python_register_toolchains(
7575            version. 
7676        **kwargs: passed to each {obj}`python_repository` call. 
7777    """ 
78- 
79-     if  BZLMOD_ENABLED :
80-         # you cannot used native.register_toolchains when using bzlmod. 
78+     bzlmod_toolchain_call  =  kwargs .pop ("_internal_bzlmod_toolchain_call" , False )
79+     if  bzlmod_toolchain_call :
8180        register_toolchains  =  False 
8281
8382    base_url  =  kwargs .pop ("base_url" , DEFAULT_RELEASE_BASE_URL )
@@ -169,7 +168,7 @@ def python_register_toolchains(
169168    )
170169
171170    # in bzlmod we write out our own toolchain repos 
172-     if  BZLMOD_ENABLED :
171+     if  bzlmod_toolchain_call :
173172        return 
174173
175174    toolchains_repo (
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments