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
{{ message }}
Repository navigation
Bug/Feature request: Check paths from arguments first, build then #832
If I set --presplash or something similar that's not main.py/main.pyo catcher, it reports if the paths isn't available, but after the whole build is done and .apk is being compiled, which I think may not be the best approach. Although it depends on bootstrap's build.py file, it might be a good thing to check paths before building than fail later.
Traceback (most recent call last):
File "/usr/local/bin/p4a", line 9, in <module>
load_entry_point('python-for-android==0.4', 'console_scripts', 'p4a')()
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 775, in main
ToolchainCL()
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 450, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 143, in wrapper_func
func(self, args)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 633, in apk
build_args = build.parse_args(args.unknown_args)
File "/home/kivy/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 521, in parse_args
make_package(args)
File "/home/kivy/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 346, in make_package
'res/drawable/presplash.jpg')
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/kivy/launcher-presplash.png'
That .png for presplash was only a typo, should be .jpg, but anyway, it was reported a way later than expected.
No, before that. Example: if someone types p4a apk --argument <path>, check if file or folder is actually there and download & build then, which is more user-friendly, because if user forgets separator, makes a typo or similar thing, it reports after everything is compiled and .apk starts packaging. If you have 20packages, then it's way to late.
Basically, not only checking if arguments are valid, but if the values are valid too.
In principle it doesn't really matter if it isn't there, because the build doesn't have to be repeated. PRs to do this kind of thing are welcome though.
Activity
inclement commentedon Jul 10, 2016
You mean that p4a should check if the launcher image exists during the apk build?
KeyWeeUsr commentedon Jul 10, 2016
No, before that. Example: if someone types
p4a apk --argument <path>, check if file or folder is actually there and download & build then, which is more user-friendly, because if user forgets separator, makes a typo or similar thing, it reports after everything is compiled and.apkstarts packaging. If you have 20packages, then it's way to late.Basically, not only checking if arguments are valid, but if the values are valid too.
inclement commentedon Jul 10, 2016
In principle it doesn't really matter if it isn't there, because the build doesn't have to be repeated. PRs to do this kind of thing are welcome though.