File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,26 @@ def test_local_lib(venv, wheel_link_against_local_lib):
177177    output  =  venv .python ('-c' , 'import example; print(example.example_sum(1, 2))' )
178178    assert  int (output ) ==  3 
179179
180+ @pytest .mark .skipif (sys .platform  in  {'win32' , 'cygwin' }, reason = 'requires RPATH support' ) 
181+ def  test_sharedlib_in_package_rpath (wheel_sharedlib_in_package , tmp_path ):
182+     artifact  =  wheel .wheelfile .WheelFile (wheel_sharedlib_in_package )
183+     artifact .extractall (tmp_path )
184+ 
185+     origin  =  '@loader_path'  if  sys .platform  ==  'darwin'  else  '$ORIGIN' 
186+ 
187+     rpath  =  set (mesonpy ._rpath ._get_rpath (tmp_path  /  'mypkg'  /  f'_example{ EXT_SUFFIX }  ' ))
188+     # This RPATH entry should be removed by meson-python but it is not. 
189+     build_rpath  =  {f'{ origin }  /../src' }
190+     assert  rpath  ==  {origin , * build_rpath }
191+ 
192+     rpath  =  set (mesonpy ._rpath ._get_rpath (tmp_path  /  'mypkg'  /  f'liblib{ LIB_SUFFIX }  ' ))
193+     # This RPATH entry should be removed by meson-python but it is not. 
194+     build_rpath  =  {f'{ origin }  /' }
195+     assert  rpath  ==  {f'{ origin }  /sub' , * build_rpath }
196+ 
197+     rpath  =  set (mesonpy ._rpath ._get_rpath (tmp_path  /  'mypkg'  /  'sub'  /  f'libsublib{ LIB_SUFFIX }  ' ))
198+     assert  rpath  ==  {}
199+ 
180200
181201def  test_sharedlib_in_package (venv , wheel_sharedlib_in_package ):
182202    venv .pip ('install' , wheel_sharedlib_in_package )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments