Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytz installation works, but requires user to make build folder manually #884

Closed
wwoods opened this issue Sep 12, 2016 · 4 comments
Closed

Comments

@wwoods
Copy link

wwoods commented Sep 12, 2016

When starting from a blank buildozer installation, if pytz is in the application's requirements, then the user will be faced with an error:

[INFO]:    Building pytz for armeabi-v7a
[INFO]:    pytz apparently isn't already in site-packages
Traceback (most recent call last):
  File "/home/wwoods/miniconda3/envs/kivy/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/wwoods/miniconda3/envs/kivy/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 798, in <module>
    main()
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 795, in main
    ToolchainCL()
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 470, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 146, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 189, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/build.py", line 561, in build_recipes
    recipe.build_arch(arch)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipe.py", line 788, in build_arch
    self.install_python_package(arch)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipe.py", line 797, in install_python_package
    env = self.get_recipe_env(arch)
  File "/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipe.py", line 765, in get_recipe_env
    hppath += [join(builddir, d) for d in listdir(builddir)
FileNotFoundError: [Errno 2] No such file or directory: 'build'
name is None <class 'pythonforandroid.recipes.pytz.PytzRecipe'>
ccache found, will optimize builds
path is /home/wwoods/walt/dev/kivy/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86/bin/:/home/wwoods/walt/dev/kivy/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86_64/bin/:/home/wwoods/walt/dev/kivy/crystax-ndk-10.3.2:/home/wwoods/.buildozer/android/platform/android-sdk-21/tools:/home/wwoods/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/wwoods/miniconda3/envs/kivy/bin:~/bin:~/miniconda3/bin:~/bin:~/miniconda3/bin:/home/wwoods/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
# Command failed: python -m pythonforandroid.toolchain --color=always --storage-dir=/home/wwoods/walt/dev/kivy/ShootingStarOrganizer/.buildozer/android/platform/build create --dist_name=sstar --bootstrap=sdl2 --requirements=python3crystax,kivy,cython,peewee,python-dateutil,pytz,six,tzlocal --arch armeabi-v7a --copy-libs
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

This may be worked around by manually creating the missing build directory:

mkdir .buildozer/android/platform/python-for-android-master/build

After this, buildozer will work (took more than one subsequent invocation for me). Ideally, this manual step should not be needed.

@inclement
Copy link
Member

I'm not sure what's wrong here, maybe it's actually a buildozer error.

@wwoods
Copy link
Author

wwoods commented Oct 10, 2016

Seems like it might be, shall I open the issue there instead?

@youpsla
Copy link

youpsla commented Dec 16, 2016

I haven't this issue with new buildozer toolchain and python2. But I had to install tzlocal which raise (when the app is on the android phone) the following error:
OSError: [Errno 2] No such file or directory: '/etc/localtime

@inclement
Copy link
Member

Closing as stale, please reopen if still a current issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants