When trying to package sdl2 from local files using requirements.source in the buildozer.spec file, buildozer does not package them properly.
sdl2 has a lot of seperate libraries which all need to be in the same folder (named jni). But for each library it tries to add, buildozer deletes the entire folder and creates a new one with the library in it. This deletes all the libraries that were previously in that folder. So when buildozer tries to access them, I get a file not found error.
Here's the important part of the terminal log:
[INFO]: Unpacking sdl2_image for arm64-v8a
[INFO]: P4A_sdl2_image_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_image /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image
[INFO]: Unpacking sdl2_mixer for arm64-v8a
[INFO]: P4A_sdl2_mixer_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_mixer /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_mixer
[INFO]: Unpacking sdl2_ttf for arm64-v8a
[INFO]: P4A_sdl2_ttf_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_ttf /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_ttf
[INFO]: Unpacking sdl2 for arm64-v8a
[INFO]: P4A_sdl2_DIR exists, symlinking instead
[DEBUG]: _Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrapbuilds/sdl2/jni (emphasis mine)
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2 /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL
Later on:
[INFO]: Prebuilding sdl2_image for arm64-v8a
[INFO]: -> directory context /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external
FileNotFoundError: [Errno 2] No such file or directory: '/home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external'
When I check the jni folder, it only has SDL in it.
There is no such error when sourcing from the internet.
When trying to package sdl2 from local files using requirements.source in the buildozer.spec file, buildozer does not package them properly.
sdl2 has a lot of seperate libraries which all need to be in the same folder (named jni). But for each library it tries to add, buildozer deletes the entire folder and creates a new one with the library in it. This deletes all the libraries that were previously in that folder. So when buildozer tries to access them, I get a file not found error.
Here's the important part of the terminal log:
[INFO]: Unpacking sdl2_image for arm64-v8a [INFO]: P4A_sdl2_image_DIR exists, symlinking instead [DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_image /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image [INFO]: Unpacking sdl2_mixer for arm64-v8a [INFO]: P4A_sdl2_mixer_DIR exists, symlinking instead [DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_mixer /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_mixer [INFO]: Unpacking sdl2_ttf for arm64-v8a [INFO]: P4A_sdl2_ttf_DIR exists, symlinking instead [DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_ttf /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_ttf [INFO]: Unpacking sdl2 for arm64-v8a [INFO]: P4A_sdl2_DIR exists, symlinking instead [DEBUG]: _Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrapbuilds/sdl2/jni (emphasis mine) [DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni [DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2 /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL
Later on: [INFO]: Prebuilding sdl2_image for arm64-v8a [INFO]: -> directory context /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external
FileNotFoundError: [Errno 2] No such file or directory: '/home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external'
When I check the jni folder, it only has SDL in it.
There is no such error when sourcing from the internet.