@@ -186,7 +186,9 @@ def clone_testbed(
186
186
sys .exit (10 )
187
187
188
188
if framework is None :
189
- if not (source / "Python.xcframework/ios-arm64_x86_64-simulator/bin" ).is_dir ():
189
+ if not (
190
+ source / "Python.xcframework/ios-arm64_x86_64-simulator/bin"
191
+ ).is_dir ():
190
192
print (
191
193
f"The testbed being cloned ({ source } ) does not contain "
192
194
f"a simulator framework. Re-run with --framework"
@@ -214,23 +216,27 @@ def clone_testbed(
214
216
if framework is not None :
215
217
if framework .suffix == ".xcframework" :
216
218
print (" Installing XCFramework..." , end = "" , flush = True )
217
- xc_framework_path = target / "Python.xcframework"
219
+ xc_framework_path = ( target / "Python.xcframework" ). resolve ()
218
220
if xc_framework_path .is_dir ():
219
221
shutil .rmtree (xc_framework_path )
220
222
else :
221
223
xc_framework_path .unlink ()
222
- xc_framework_path .symlink_to (framework )
224
+ xc_framework_path .symlink_to (
225
+ framework .relative_to (xc_framework_path .parent , walk_up = True )
226
+ )
223
227
print (" done" )
224
228
else :
225
229
print (" Installing simulator framework..." , end = "" , flush = True )
226
230
sim_framework_path = (
227
231
target / "Python.xcframework" / "ios-arm64_x86_64-simulator"
228
- )
232
+ ). resolve ()
229
233
if sim_framework_path .is_dir ():
230
234
shutil .rmtree (sim_framework_path )
231
235
else :
232
236
sim_framework_path .unlink ()
233
- sim_framework_path .symlink_to (framework )
237
+ sim_framework_path .symlink_to (
238
+ framework .relative_to (sim_framework_path .parent , walk_up = True )
239
+ )
234
240
print (" done" )
235
241
else :
236
242
print (" Using pre-existing iOS framework." )
@@ -351,7 +357,7 @@ def main():
351
357
clone_testbed (
352
358
source = Path (__file__ ).parent ,
353
359
target = Path (context .location ),
354
- framework = Path (context .framework ) if context .framework else None ,
360
+ framework = Path (context .framework ). resolve () if context .framework else None ,
355
361
apps = [Path (app ) for app in context .apps ],
356
362
)
357
363
elif context .subcommand == "run" :
0 commit comments