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

Buildozer fails to install Twisted on the first build attempt #1601

Open
bingo-V opened this issue May 10, 2023 · 2 comments
Open

Buildozer fails to install Twisted on the first build attempt #1601

bingo-V opened this issue May 10, 2023 · 2 comments

Comments

@bingo-V
Copy link

bingo-V commented May 10, 2023

Versions

  • Python: 3.8.10
  • OS: 20.04.1-Ubuntu
  • Buildozer: 1.5.0
  • Kivy: 2.1.0

Description

I add twisted, zope.interface and attrs to requirements of buildozer.spec file in order to use Twisted for my Kivy project.
I ran buildozer android debug but the build failed at the first time. When i ran buildozer android debug again without any changes, the build succeeded without any errors.

buildozer.spec

Command:

buildozer android debug

Spec file:

requirements = python3,kivy==2.1.0,oscpy,attrs,twisted,zope.interface

Expected Result

The build succeed on the first attempt.

Logs

[INFO]:    Building zope_interface for arm64-v8a
[INFO]:    zope.interface apparently isn't already in site-packages
[INFO]:    Installing zope_interface into site-packages
[INFO]:    -> directory context /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/other_builds/zope_interface/arm64-v8a__ndk_target_21/zope_interface
[DEBUG]:   -> running python3 setup.py install -O2 --root=/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a --install-lib=.
[DEBUG]:   	running install
[DEBUG]:   	running build
[DEBUG]:   	running build_py
[DEBUG]:   	creating build
[DEBUG]:   	creating build/lib
[DEBUG]:   	creating build/lib/zope
[DEBUG]:   	copying src/zope/__init__.py -> build/lib/zope
[DEBUG]:   	creating build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/ro.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/interface.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/declarations.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/advice.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/interfaces.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/adapter.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/registry.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/verify.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/document.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/_compat.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/exceptions.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/__init__.py -> build/lib/zope/interface
[DEBUG]:   	copying src/zope/interface/_flatten.py -> build/lib/zope/interface
[DEBUG]:   	running install_lib
[DEBUG]:   	creating /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/zope
[DEBUG]:   	creating /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/zope/interface
[DEBUG]:   	copying build/lib/zope/interface/ro.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/interface.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/declarations.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/advice.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/interfaces.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/adapter.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/registry.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/verify.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/document.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/_compat.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/exceptions.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/__init__.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/interface/_flatten.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface
[DEBUG]:   	copying build/lib/zope/__init__.py -> /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/ro.py to ro.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/interface.py to interface.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/declarations.py to declarations.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/advice.py to advice.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/interfaces.py to interfaces.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/adapter.py to adapter.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/registry.py to registry.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/verify.py to verify.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/document.py to document.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/_compat.py to _compat.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/exceptions.py to exceptions.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/__init__.py to __init__.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/interface/_flatten.py to _flatten.cpython-39.pyc
[DEBUG]:   	byte-compiling /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope/__init__.py to __init__.cpython-39.pyc
[DEBUG]:   	writing byte-compilation script '/tmp/tmps5pl8my9.py'
[DEBUG]:   	/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 /tmp/tmps5pl8my9.py
[DEBUG]:   	removing /tmp/tmps5pl8my9.py
[DEBUG]:   	running install_egg_info
[DEBUG]:   	running egg_info
[DEBUG]:   	writing src/zope.interface.egg-info/PKG-INFO
[DEBUG]:   	writing dependency_links to src/zope.interface.egg-info/dependency_links.txt
[DEBUG]:   	deleting src/zope.interface.egg-info/namespace_packages.txt
[DEBUG]:   	deleting src/zope.interface.egg-info/requires.txt
[DEBUG]:   	writing top-level names to src/zope.interface.egg-info/top_level.txt
[DEBUG]:   	reading manifest file 'src/zope.interface.egg-info/SOURCES.txt'
[DEBUG]:   	reading manifest template 'MANIFEST.in'
[DEBUG]:   	warning: no previously-included files matching '*.dll' found anywhere in distribution
[DEBUG]:   	warning: no previously-included files matching '*.pyc' found anywhere in distribution
[DEBUG]:   	warning: no previously-included files matching '*.pyo' found anywhere in distribution
[DEBUG]:   	warning: no previously-included files matching '*.so' found anywhere in distribution
[DEBUG]:   	warning: no previously-included files matching 'coverage.xml' found anywhere in distribution
[DEBUG]:   	no previously-included directories found matching 'docs/_build'
[DEBUG]:   	writing manifest file 'src/zope.interface.egg-info/SOURCES.txt'
[DEBUG]:   	Copying src/zope.interface.egg-info to /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/./zope.interface-4.1.3-py3.9.egg-info
[DEBUG]:   	running install_scripts
[INFO]:    <- directory context /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android
[INFO]:    Applying patch fix-init.patch
[DEBUG]:   -> running patch -t -d /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/zope -p1 -i /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/zope_interface/fix-init.patch
[DEBUG]:   	The next patch would create the file __init__.py,
[DEBUG]:   	which already exists!  Assuming -R.
[DEBUG]:   	patching file __init__.py
[DEBUG]:   	Hunk #1 FAILED at 1.
[DEBUG]:   	Not deleting file __init__.py as content differs from patch
[DEBUG]:   	1 out of 1 hunk FAILED -- saving rejects to file __init__.py.rej
Exception in thread background thread for pid 495244:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 1641, in wrap
    fn(*rgs, **kwargs)
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 2569, in background_thread
    handle_exit_code(exit_code)
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 2269, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/patch -t -d /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/zope -p1 -i /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/zope_interface/fix-init.patch

  STDOUT:
The next patch would create the file __init__.py,
which already exists!  Assuming -R.
patching file __init__.py
Hunk #1 FAILED at 1.
Not deleting file __init__.py as content differs from patch
1 out of 1 hunk FAILED -- saving rejects to file __init__.py.rej


  STDERR:

[INFO]:    STDOUT:
	The next patch would create the file __init__.py,
which already exists!  Assuming -R.
patching file __init__.py
Hunk #1 FAILED at 1.
Not deleting file __init__.py as content differs from patch
1 out of 1 hunk FAILED -- saving rejects to file __init__.py.rej
[INFO]:    STDERR:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1312, in <module>
    main()
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 734, in __init__
    getattr(self, command)(args)
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 212, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes
    recipe.build_arch(arch)
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/zope_interface/__init__.py", line 23, in build_arch
    self.apply_patch('fix-init.patch', arch.arch, build_dir=zope_install)
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 249, in apply_patch
    shprint(sh.patch, "-t", "-d", build_dir, "-p1",
  File "/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 915, in next
    self.wait()
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 845, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/lib/python3.8/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/patch -t -d /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a/build/python-installs/vgraph/arm64-v8a/zope -p1 -i /home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/zope_interface/fix-init.patch

  STDOUT:
The next patch would create the file __init__.py,
which already exists!  Assuming -R.
patching file __init__.py
Hunk #1 FAILED at 1.
Not deleting file __init__.py as content differs from patch
1 out of 1 hunk FAILED -- saving rejects to file __init__.py.rej


  STDERR:

# Command failed: ['/home/fangyu/.local/share/virtualenvs/vgraph-lAxBUAo9/bin/python', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=vgraph', '--bootstrap=sdl2', '--requirements=python3,kivy==2.1.0,oscpy,attrs,twisted,zope.interface', '--arch=arm64-v8a', '--copy-libs', '--color=always', '--storage-dir=/home/fangyu/develop/projects/vgraph/vgraph/.buildozer/android/platform/build-arm64-v8a', '--ndk-api=21', '--ignore-setup-py', '--debug']
@Pandy90
Copy link

Pandy90 commented May 18, 2024

Have you already solved this problem? I have the same problem

@pnkmem429
Copy link

I have the same problem. Twisted is not the problem, but zope_interface is.
I think I might not use datetime(which uses zope_interface) and detour using time instead...

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

No branches or pull requests

4 participants