You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the result of the command $ buildozer android debug logcat , the last lines being :
Cloning into 'python-for-android-new-toolchain'...
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in <module>
load_entry_point('buildozer==0.35', 'console_scripts', 'buildozer')()
[...]
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 524, in _install_p4a
deps = re.findall("^install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[0]
IndexError: list index out of range
These lines had already been fixed, see this issue and the fix #724.
In the setup file read by setup=fd.read() (namely /home/sui/Desktop/kivypong/.buildozer/android/platform/python-for-android-new-toolchain/setup.py), the interesting lines (=relative to the regex) are:
if os.name == 'nt':
install_reqs = ['appdirs', 'colorama>=0.3.3', 'jinja2',
'six']
else:
# don't use sh after 1.12.5, we have performance issues
# https://github.com/amoffat/sh/issues/378
install_reqs = ['appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2',
'six']
I'm not an expert but it seems to me that ^install_reqs = (\[[^\]]*\]) can't catch the string install_reqs = ['appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2', 'six'] .
I don't understand the logic behind this line of code so I can't go further.
By example, I don't understand the meaning of [0] in [524] deps = re.findall("^install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[0]
since there are 2 lists of dependencies, the first one being only for NT system.
By the way, if I replace the regex used in re.findall() by install_reqs = (\[[^\]]*\]) (no more ^), I get two lists of dependencies (the first one for NT system, the second for the other systems), namely : ["['appdirs', 'colorama>=0.3.3', 'jinja2',\n 'six']", "['appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2',\n 'six']"] . I don't know how ast works so I can't tell if this result would is ok for ast or not. A new call $ buildozer android debug logcat with such a modification leads to the expected message: Run "pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six'
... i.e. the dependencies expected for a NT system. Logically, the build fails some seconds later on my Ubuntu system with the message: ERROR: The sh Python module could not be found, please install version 1.10 or higher
Finally, I bypassed those lines by installing manually the required depencies (namely, 'appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2', 'six') and by writing in android.py :
... and the $ buildozer android debug logcat goes on and produces an AKP file. I don't know if the content of this file is ok - I have presently not enough time to launch it.
I hope this will help !
The text was updated successfully, but these errors were encountered:
suizokukan
changed the title
AKP build fails (android.py ligne 524)
AKP build fails (android.py line 524)
Oct 31, 2018
First of all, thank you very much for the incredible amount work behind
kivy
!python=3.6 / Ubuntu 18.04.1 LTS / kivy=1.10.1/ cython=0.25.2
I installed Kivy and Buildozer using this script of my own, following all instructions given here, here, and here.
I tried to compile the Pong example using this buildozer.spec file (please note the lines requirements = python3crystax==3.6,kivy and log_level = 2)
Here is the result of the command
$ buildozer android debug logcat
, the last lines being :The problematic lines in
android.py
are:These lines had already been fixed, see this issue and the fix #724.
In the setup file read by
setup=fd.read()
(namely/home/sui/Desktop/kivypong/.buildozer/android/platform/python-for-android-new-toolchain/setup.py
), the interesting lines (=relative to the regex) are:I'm not an expert but it seems to me that
^install_reqs = (\[[^\]]*\])
can't catch the stringinstall_reqs = ['appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2', 'six']
.I don't understand the logic behind this line of code so I can't go further.
By example, I don't understand the meaning of
[0]
in[524] deps = re.findall("^install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[0]
since there are 2 lists of dependencies, the first one being only for NT system.
By the way, if I replace the regex used in
re.findall()
byinstall_reqs = (\[[^\]]*\])
(no more ^), I get two lists of dependencies (the first one for NT system, the second for the other systems), namely :["['appdirs', 'colorama>=0.3.3', 'jinja2',\n 'six']", "['appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2',\n 'six']"]
. I don't know howast
works so I can't tell if this result would is ok forast
or not. A new call$ buildozer android debug logcat
with such a modification leads to the expected message:Run "pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six'
... i.e. the dependencies expected for a NT system. Logically, the build fails some seconds later on my Ubuntu system with the message:
ERROR: The sh Python module could not be found, please install version 1.10 or higher
Finally, I bypassed those lines by installing manually the required depencies (namely,
'appdirs', 'colorama>=0.3.3', 'sh>=1.10,<1.12.5', 'jinja2', 'six'
) and by writing inandroid.py
:... and the
$ buildozer android debug logcat
goes on and produces an AKP file. I don't know if the content of this file is ok - I have presently not enough time to launch it.I hope this will help !
The text was updated successfully, but these errors were encountered: