kivy-sdl2 patching error stops creating distribution -- "back-patch can help"

29 views
Skip to first unread message

gobftald

unread,
Oct 10, 2015, 5:21:37 PM10/10/15
to Python For Android

p4a create --dist_name=sdl2 --bootstrap=sdl2 --requirements=sdl2,python2,kivy


gives:


###########

...........


RAN: '/usr/bin/patch -t -d /home/piv/.local/share/python-for-android/build/other_builds/kivy-sdl2/armeabi/kivy -p1 -i /usr/local/lib/python2.7/dist-packages/pythonforandroid/recipes/kivy/android_sdl2_compat.patch'


  STDOUT:

patching file kivy/app.py

Reversed (or previously applied) patch detected!  Assuming -R.

Hunk #1 succeeded at 326 (offset 3 lines).

Hunk #2 succeeded at 1023 (offset 3 lines).

patching file kivy/core/window/__init__.py

Reversed (or previously applied) patch detected!  Assuming -R.

Hunk #1 succeeded at 497 (offset 35 lines).

patching file kivy/core/window/window_sdl2.py

Reversed (or previously applied) patch detected!  Assuming -R.

Hunk #1 succeeded at 393 (offset 72 lines).

patching file kivy/metrics.py

Reversed (or previously applied) patch detected!  Assuming -R.

Hunk #3 FAILED at 217.

1 out of 3 hunks FAILED -- saving rejects to file kivy/metrics.py.rej

patching file setup.py

Reversed (or previously applied) patch detected!  Assuming -R.... (44 more, please see e.stdout)


  STDERR:


...........

###########


The problem is that "~/.local/share/python-for-android/build/other_builds/kivy-sdl2/armeabi/kivy/kivy/metrics.py" has already somehow -- at least partly -- patched (e.g. it contains "if USE_SDL2:" statement).

Original "metrics.py" comes/downloaded from "https://codeload.github.com/kivy/kivy/zip/master" during creating distribution then in patching phase fails since wrong differences.


If you edit and regenerate (back-patch) the file based on the relevant patch file:

"/usr/local/lib/python2.7/dist-packages/pythonforandroid/recipes/kivy/android_sdl2_compat.patch"

p4a distribution creation script can finish its job.


Alexander Taylor

unread,
Oct 10, 2015, 7:27:30 PM10/10/15
to Python For Android
I pushed the patch to kivy master, and removed the manual patching from the recipe. This should not happen if you download the latest version of python-for-android from the github master.
Reply all
Reply to author
Forward
0 new messages