Bump aiohttp version to 3.8.0 (latest stable)
It looks like the CI couldn't compile this version. I'm wondering if it could compile the previous one. The error was:
[INFO]: Building aiohttp for armeabi-v7a
[INFO]: aiohttp apparently isn't already in site-packages
[INFO]: Cythonizing anything necessary in aiohttp
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/aiohttp/armeabi-v7a__ndk_target_21/aiohttp
stty: 'standard input': Inappropriate ioctl for device
[INFO]: -> running python3 -c import sys; print(sys.path)
[INFO]: Trying first build of aiohttp to get cython files: this is expected to fail
stty: 'standard input': Inappropriate ioctl for device
[INFO]: -> running python3 setup.py build_ext -v
Exception in thread background thread for pid 34563:
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/user/app/venv/lib/python3.8/site-packages/sh.py", line 1683, in wrap
fn(*rgs, **kwargs)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 2662, in background_thread
handle_exit_code(exit_code)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 2349, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v
STDOUT:
*********************
* Accelerated build *
*********************
running build_ext
building 'aiohttp._websocket' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/aiohttp
/usr/bin/ccache /home/user/.android/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/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -DANDROID -D__ANDROID_API__=21 -I/home/user/.android/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/home/user/.local/share/python-for-android/build/python-installs/bdist_unit_tests_app/armeabi-v7a/include/python3.8 -fPIC -I/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build -c aiohttp/_websocket.c -o build/temp.linux-x86_64-3.8/aiohttp/_websocket.o
clang: error: no such file or directory: 'aiohttp/_websocket.c'
clang: error: no input files
error: command '/usr/bin/ccache' failed with exit status 1
STDERR:
[INFO]: aiohttp first build failed (as expected)
[INFO]: Running cython where appropriate
[INFO]: Cythonize aiohttp/_http_writer.pyx
stty: 'standard input': Inappropriate ioctl for device
[INFO]: -> running python3 -cimport sys; from Cython.Compiler.Main im...(and 77 more)
[INFO]: Cythonize aiohttp/_http_parser.pyx
stty: 'standard input': Inappropriate ioctl for device
[INFO]: -> running python3 -cimport sys; from Cython.Compiler.Main im...(and 77 more)
Exception in thread background thread for pid 34580:
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/user/app/venv/lib/python3.8/site-packages/sh.py", line 1683, in wrap
fn(*rgs, **kwargs)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 2662, in background_thread
handle_exit_code(exit_code)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 2349, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/user/app/venv/bin/python3 '-cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main());' ./aiohttp/_http_parser.pyx
STDOUT:
Error compiling Cython file:
------------------------------------------------------------
...
cimport cython
from aiohttp cimport _cparser as cparser
include "_headers.pxi"
^
------------------------------------------------------------
aiohttp/_http_parser.pyx:46:0: '_headers.pxi' not found
STDERR:
Traceback (most recent call last):
File "setup.py", line 95, in <module>
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/user/app/pythonforandroid/bdistapk.py", line 79, in run
main()
File "/home/user/app/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/user/app/pythonforandroid/toolchain.py", line 728, in __init__
getattr(self, command)(args)
File "/home/user/app/pythonforandroid/toolchain.py", line 151, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/user/app/pythonforandroid/toolchain.py", line 210, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/home/user/app/pythonforandroid/build.py", line 596, in build_recipes
recipe.build_arch(arch)
File "/home/user/app/pythonforandroid/recipe.py", line 1059, in build_arch
self.build_cython_components(arch)
File "/home/user/app/pythonforandroid/recipe.py", line 1084, in build_cython_components
self.cythonize_build(env=env)
File "/home/user/app/pythonforandroid/recipe.py", line 1132, in cythonize_build
self.cythonize_file(env, build_dir, join(root, filename))
File "/home/user/app/pythonforandroid/recipe.py", line 1121, in cythonize_file
shprint(python_command, "-c"
File "/home/user/app/pythonforandroid/logger.py", line 167, in shprint
for line in output:
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 953, in next
self.wait()
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 879, in wait
self.handle_command_exit_code(exit_code)
File "/home/user/app/venv/lib/python3.8/site-packages/sh.py", line 905, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/user/app/venv/bin/python3 '-cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main());' ./aiohttp/_http_parser.pyx
Full log here https://github.com/kivy/python-for-android/runs/4175115628?check_suite_focus=true
See also:
- additional details and steps to reproduce this bug: p4a bug #2651 (
aiohttp/_http_parser.pyx:46:0: '_headers.pxi' not found) - possibly related: kivy bug #1422 (
jnius/jnius_jvm_dlopen.pxi:1:0: 'config.pxi' not found)
Any update in this one??
Having the same issue, and it's a blocker for my project.
@DexerBR, have you found a solution?
@DexerBR, have you found a solution?
Hi @xavierfiechter! Actually, python's asyncio library can provide workarounds for many things present in that library.
@DexerBR I try to build using GitHub Actions, here, https://github.com/Bitcoin-Brainbow/Brainbow/actions/runs/3261026072/jobs/5355208694 and it terminates with aiohttp/_http_parser.pyx:46:0: '_headers.pxi' not found.
See https://github.com/kivy/python-for-android/pull/2690