File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -712,6 +712,16 @@ pub async fn install(
712712 std:: os:: unix:: fs:: symlink ( base_path. join ( "renpy" ) , base_path. join ( "rapt/renpy" ) ) ?;
713713 }
714714
715+ println ! ( "Patching import issue in android.py" ) ;
716+ // it imports pygame_sdl2 but never uses it. it's not in sys.path by default, which makes it annoying to deal with
717+ let interface_path = base_path. join ( "rapt/android.py" ) ;
718+ let content = fs:: read_to_string ( & interface_path) ?;
719+ let lines: Vec < & str > = content
720+ . split ( '\n' )
721+ . filter ( |line| !line. contains ( "import pygame_sdl2" ) )
722+ . collect ( ) ;
723+ fs:: write ( & interface_path, lines. join ( "\n " ) ) ?;
724+
715725 unsafe { env:: set_var ( "RAPT_NO_TERMS" , "1" ) } ;
716726
717727 let android_py = base_path. join ( "rapt/android.py" ) ;
You can’t perform that action at this time.
0 commit comments