Problem to create an apk with ./distribute.sh: line 127: patch: command not found

106 views
Skip to first unread message

Jessica C

unread,
Feb 12, 2015, 8:32:32 AM2/12/15
to python-...@googlegroups.com
Hi !

I just discover Kivy and I find that it is amazing to create very quickly apps.
But I am searching on internet since 3 days now to test a simple hello world on my android device and I can not create a apk.

./distribute.sh: line 127: patch: command not found

I do not understand the code in the script :
function try () {
    "$@" || exit -1
}

and I found nobody having the same problem on internet.

Maybe you can help me ?

I am using buildozer to create the apk.
And when I tried using only python-for-android manually, I have exactly the same thing.

Ben Rousch

unread,
Feb 12, 2015, 1:42:34 PM2/12/15
to python-...@googlegroups.com
What does this command return: which patch

Jessica C

unread,
Feb 13, 2015, 3:31:19 AM2/13/15
to python-...@googlegroups.com
Sorry, I forgot to put the last line.

Run prebuild
Call prebuild_hostpython
Call prebuild_python

./distribute.sh: line 127: patch: command not found
# Command failed: ./distribute.sh -m "kivy" -d "myapp"

This is the complete log :
(cortes_j@pc-cortes_j 2)buildozer -v android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
/bin/sh: dpkg: command not found
# Search for Git (git)
#  -> found at /usr/lib/git/git
# Search for Cython (cython)
#  -> found at /usr/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/bin/keytool
# Install platform
# Apache ANT found at /home/cortes_j/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/cortes_j/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/cortes_j/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/cortes_j/Slap/.buildozer/android/platform/python-for-android
which: no cython2 in (/home/cortes_j/.buildozer/android/platform/apache-ant-1.9.4/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/heimdal/bin:/usr/heimdal/sbin)
Available modules: android apsw audiostream c_igraph cprotobuf cymunk django docutils ffmpeg gevent greenlet hostpython igraph jpeg kivent kivy libevent libpq libswift libxml2 libxslt libyaml lxml m2crypto msgpack mysql_connector netifaces numpy openssl paramiko pil plyer png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools sqlalchemy sqlite3 storm swift twisted txws wokkel zope
# Application requirements already installed, pass
# Check garden requirements
# Compile platform
# Run './distribute.sh -l'
# Cwd /home/cortes_j/Slap/.buildozer/android/platform/python-for-android
which: no cython2 in (/home/cortes_j/.buildozer/android/platform/apache-ant-1.9.4/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/heimdal/bin:/usr/heimdal/sbin)
Available modules: android apsw audiostream c_igraph cprotobuf cymunk django docutils ffmpeg gevent greenlet hostpython igraph jpeg kivent kivy libevent libpq libswift libxml2 libxslt libyaml lxml m2crypto msgpack mysql_connector netifaces numpy openssl paramiko pil plyer png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools sqlalchemy sqlite3 storm swift twisted txws wokkel zope
# Clean and build python-for-android
# Remove directory and subdirectory /home/cortes_j/Slap/.buildozer/android/platform/python-for-android/dist/myapp
# Run './distribute.sh -m "kivy" -d "myapp"'
# Cwd /home/cortes_j/Slap/.buildozer/android/platform/python-for-android
which: no cython2 in (/home/cortes_j/.buildozer/android/platform/apache-ant-1.9.4/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/heimdal/bin:/usr/heimdal/sbin)
Check build dependencies for openSUSE project
Avoid check build dependencies, unknow platform openSUSE project
Check enviromnent
SDK located at /home/cortes_j/.buildozer/android/platform/android-sdk-21
NDK located at /home/cortes_j/.buildozer/android/platform/android-ndk-r9c
NDK version is r9c
API level set to 14
Check mandatory tools
Distribution will be located at /home/cortes_j/Slap/.buildozer/android/platform/python-for-android/dist/myapp
Entering in ARM environment
Compiler found at /home/cortes_j/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
PATH is /home/cortes_j/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/:/home/cortes_j/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/:/home/cortes_j/.buildozer/android/platform/android-ndk-r9c:/home/cortes_j/.buildozer/android/platform/android-sdk-21/tools:/home/cortes_j/.buildozer/android/platform/apache-ant-1.9.4/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/heimdal/bin:/usr/heimdal/sbin
Leaving ARM enviromnent
Read kivy recipe
Module kivy depend on pygame pyjnius android
Read pygame recipe
Module pygame depend on python sdl
Read pyjnius recipe
Module pyjnius depend on python sdl
Read android recipe
Module android depend on pygame
Read python recipe
Module python depend on hostpython
Read sdl recipe
Module sdl depend on python
Ignored python, already processed
Ignored sdl, already processed
Ignored pygame, already processed
Read hostpython recipe
Ignored python, already processed
Modules changed to hostpython python sdl pygame pyjnius android kivy
Pure-Python modules changed to
Run get packages
Download package for hostpython
Module hostpython already downloaded
Download package for python
Module python already downloaded
Download package for sdl
No package for sdl
Download package for pygame
Module pygame already downloaded
Download package for pyjnius
Module pyjnius already downloaded
Download package for android
No package for android
Download package for kivy
Module kivy already downloaded
Run prebuild
Call prebuild_hostpython
Call prebuild_python

./distribute.sh: line 127: patch: command not found
# Command failed: ./distribute.sh -m "kivy" -d "myapp"
(cortes_j@pc-cortes_j 3)


Thank you very much for you help !

2015-02-12 19:42 GMT+01:00 Ben Rousch <bro...@gmail.com>:
What does this command return: which patch

--
You received this message because you are subscribed to a topic in the Google Groups "Python For Android" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-android/N7BeVhrj3yY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-androi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben Rousch

unread,
Feb 13, 2015, 6:17:22 AM2/13/15
to python-...@googlegroups.com
My question is the same. What does this command return:
which patch
--

Jessica C

unread,
Feb 13, 2015, 8:16:06 AM2/13/15
to python-...@googlegroups.com
patch -p1



I had a echo in the distribute.sh script:
function try () {
    echo "$@";
    "$@" || exit -1
}

I have :
patch -p1
./distribute.sh: line 128: patch: command not found

# Command failed: ./distribute.sh -m "kivy" -d "myapp"



Jessica C

unread,
Feb 13, 2015, 5:33:21 PM2/13/15
to python-...@googlegroups.com
Sorry I just understand now what you ask me.
I was thinking patch was a kind of module and do not think of the exe.

Sorry and thank !
Reply all
Reply to author
Forward
0 new messages