bcrypt в сборке apk файла с помощью buildozer - PullRequest
0 голосов
/ 09 апреля 2020

Когда я добавляю bcrypt к требованиям в файле buildozer.spe c, buildozer не создает проект. Без bcrypt проект собирается нормально. Как добавить bcrypt, чтобы проект был успешным? Без bcrypt приложение на телефоне вылетает сразу после запуска.

Python версия 3.6.9

Журнал ошибок сборки:

[INFO]:    -> running python3 setup.py clean --all
[INFO]:    -> running python3 setup.py build_ext -v                            
Exception in thread background thread for pid 8389:                            
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v

  STDOUT:
running build_ext
building '_cffi_backend' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
/home/skullage/.buildozer/android/platform/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/include -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -D__ANDROID_API__=21 -I/home/skullage/.buildozer/android/platform/android-ndk-r19b/sysroot/usr/include/arm-linux-androideabi -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/include/python3.8 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:4197:31: warning: assigning to 'char *' from 'const char *'
      discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        *p_printable_filename = PyText_AsUTF8(s);
                              ^ ~~~~~~~~~~~~~~~~
c/_cffi_backend.c:5911:9: warning: 'ffi_prep_closure' is deprecated
      [-Wdeprecated-declarations]
    if (ffi_prep_closure(closure, &cif_descr->cif,
        ^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/include/ffi.h:339:18: note: 
      'ffi_prep_closure' has been explicitly marked deprecated here
  __attribute__((deprecated))
                 ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:20:30: error: incomplete definition of type 'struct _is'
    builtins = tstate->interp->builtins;
               ~~~~~~~~~~~~~~^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pystate.h:20:8: note: 
      forward declaration of 'struct _is'
struct _is;
       ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:160:39: error: incomplete definition of type 'struct _is'
    new1 = PyThreadState_GET()->interp->modules;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pystate.h:20:8: note: 
      forward declaration of 'struct _is'
struct _is;
       ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:249:63: error: incomplete definition of type 'struct _is'
        if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pystate.h:20:8: note: 
      forward declaration of 'struct _is'
struct _is;
       ^
2 warnings and 3 errors generated.
error: command '/home/skullage/.buildozer/android/platform/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit status 1
  STDERR:
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1199, in <module>
    main()
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 671, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 209, in build_dist_from_args
    args, "ignore_setup_py", False
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 580, in build_recipes
    recipe.build_arch(arch)
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1009, in build_arch
    self.build_compiled_components(arch)
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1021, in build_compiled_components
    _env=env, *self.setup_extra_args)
  File "/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
    for line in output:
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 863, in next
    self.wait()
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh-1.12.14-py3.6.egg/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 
  RAN: /home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v
  STDOUT:
running build_ext
building '_cffi_backend' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
/home/skullage/.buildozer/android/platform/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/include -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -D__ANDROID_API__=21 -I/home/skullage/.buildozer/android/platform/android-ndk-r19b/sysroot/usr/include/arm-linux-androideabi -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/include/python3.8 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:4197:31: warning: assigning to 'char *' from 'const char *'
      discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        *p_printable_filename = PyText_AsUTF8(s);
                              ^ ~~~~~~~~~~~~~~~~
c/_cffi_backend.c:5911:9: warning: 'ffi_prep_closure' is deprecated
      [-Wdeprecated-declarations]
    if (ffi_prep_closure(closure, &cif_descr->cif,
        ^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/include/ffi.h:339:18: note: 
      'ffi_prep_closure' has been explicitly marked deprecated here
  __attribute__((deprecated))
                 ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:20:30: error: incomplete definition of type 'struct _is'
    builtins = tstate->interp->builtins;
               ~~~~~~~~~~~~~~^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pystate.h:20:8: note: 
      forward declaration of 'struct _is'
struct _is;
       ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:160:39: error: incomplete definition of type 'struct _is'
    new1 = PyThreadState_GET()->interp->modules;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pystate.h:20:8: note: 
      forward declaration of 'struct _is'
struct _is;
       ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:249:63: error: incomplete definition of type 'struct _is'
        if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pystate.h:20:8: note: 
      forward declaration of 'struct _is'
struct _is;
       ^
2 warnings and 3 errors generated.
error: command '/home/skullage/.buildozer/android/platform/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit status 1
  STDERR:
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy,sqlite3,bcrypt --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/skullage/Mobile4/venv/Include/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
...