flet
flet copied to clipboard
tar:no tar archive, when packaging modules with p4a
Duplicate Check
- [X] I have searched the opened issues and there are no duplicates
Describe the bug
I have a problem packaging the requests and xmltodoct library
Code sample
No sample
To reproduce
Run p4a command in terminal
Expected behavior
tar have an error
Screenshots / Videos
Screenshots / Video demonstration
[Upload media here]
Operating System
Linux
Operating system details
Ubuntu 24.10
Flet version
0.23.2
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
$ p4a create --requirements requests,xmltodict --arch arm64-v8a --arch armeabi-v7a --arch x86_64 --sdk-dir $ANDROID_SDK_ROOT --ndk-dir $ANDROID_SDK_ROOT/ndk/$NDK_VERSION --dist-name mydist
[WARNING]: prerequisites.py is experimental and does not support all prerequisites yet.
[WARNING]: Please report any issues to the python-for-android issue tracker.
[INFO]: Will compile for the following archs: arm64-v8a, armeabi-v7a, x86_64
[INFO]: Android API target was not set manually, using the default of 33
[INFO]: Available Android APIs are (31, 33, 34)
[INFO]: Requested API target 33 is available, continuing.
[INFO]: Getting NDK dir from from user argument
[INFO]: Found NDK version 25c
[WARNING]: NDK API target was not set manually, using the default of 21 = min(android-api=33, default ndk-api=21)
[INFO]: ccache is missing, the build will not be optimized in the future.
[INFO]: No existing dists meet the given requirements!
[INFO]: No dist exists that meets your requirements, so one will be built.
[INFO]: Found a single valid recipe set: ['requests', 'xmltodict']
[INFO]: Trying to find a bootstrap that matches the given recipes.
[INFO]: Found 4 acceptable bootstraps: ['service_only', 'service_library', 'sdl2', 'webview']
[INFO]: Using the highest ranked/first of these: service_only
[INFO]: Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'requests', 'sqlite3', 'xmltodict', 'python3', 'genericndkbuild', 'setuptools', 'six', 'pyjnius', 'android']
[INFO]: The selected bootstrap is service_only
[INFO]: # Creating dist with service_only bootstrap
[INFO]: Dist will have name mydist and requirements (requests, xmltodict)
[INFO]: Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sqlite3', 'python3', 'genericndkbuild', 'setuptools', 'six', 'pyjnius', 'android']
[INFO]: Dist will also contain modules (xmltodict, requests) installed from pip
[INFO]: Dist will be build in mode debug
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/build/bootstrap_builds/service_only
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sqlite3', 'python3', 'genericndkbuild', 'setuptools', 'six', 'pyjnius', 'android']
[INFO]: The requirements (requests, xmltodict) were not found as recipes, they will be installed with pip.
[INFO]: # Downloading recipes
[INFO]: Downloading hostpython3
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/hostpython3
[INFO]: -> running basename https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tgz
[INFO]: hostpython3 download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading libffi
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/libffi
[INFO]: -> running basename https://github.com/libffi/libffi/archive/v3.4.2.tar.gz
[INFO]: libffi download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading openssl
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/openssl
[INFO]: -> running basename https://www.openssl.org/source/openssl-1.1.1w.tar.gz
[INFO]: openssl download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading sqlite3
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/sqlite3
[INFO]: -> running basename https://www.sqlite.org/2021/sqlite-amalgamation-3350500.zip
[INFO]: sqlite3 download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading python3
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/python3
[INFO]: -> running basename https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tgz
[INFO]: python3 download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading genericndkbuild
[INFO]: Skipping genericndkbuild download as no URL is set
[INFO]: Downloading setuptools
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/setuptools
[INFO]: -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-69.2.0.tar.gz
[INFO]: setuptools download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading six
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/six
[INFO]: -> running basename https://pypi.python.org/packages/source/s/six/six-1.15.0.tar.gz
[INFO]: six download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading pyjnius
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/packages/pyjnius
[INFO]: -> running basename https://github.com/kivy/pyjnius/archive/1.6.1.zip
[INFO]: pyjnius download already cached, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Downloading android
[INFO]: Skipping android download as no URL is set
[INFO]: # Building all recipes for arch arm64-v8a
[INFO]: # Unpacking recipes
[INFO]: Unpacking hostpython3 for arm64-v8a
[INFO]: -> running basename https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tgz
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/build/other_builds/hostpython3/desktop
[INFO]: hostpython3 is already unpacked, skipping
[INFO]: <- directory context /home/megamichi/Schreibtisch/flet
[INFO]: Unpacking libffi for arm64-v8a
[INFO]: -> running basename https://github.com/libffi/libffi/archive/v3.4.2.tar.gz
[INFO]: -> directory context /home/megamichi/.local/share/python-for-android/build/other_builds/libffi/arm64-v8a__ndk_target_21
Traceback (most recent call last):
File "/home/megamichi/Schreibtisch/flet/.venv/bin/p4a", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/toolchain.py", line 685, in __init__
getattr(self, command)(args)
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/toolchain.py", line 104, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/build.py", line 490, in build_recipes
recipe.prepare_build_dir(arch.arch)
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/recipe.py", line 592, in prepare_build_dir
self.unpack(arch)
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/pythonforandroid/recipe.py", line 469, in unpack
sh.tar('xf', extraction_filename)
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/sh.py", line 1524, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/sh.py", line 788, in __init__
self.wait()
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/sh.py", line 845, in wait
self.handle_command_exit_code(exit_code)
File "/home/megamichi/Schreibtisch/flet/.venv/lib/python3.12/site-packages/sh.py", line 869, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /usr/bin/tar xf /home/megamichi/.local/share/python-for-android/packages/libffi/v3.4.2.tar.gz
STDOUT:
STDERR:
/usr/bin/tar: Das sieht nicht wie ein „tar“-Archiv aus.
gzip: stdin: unexpected end of file
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error is not recoverable: exiting now
translation of STDERR:This doesn't look like a tar archive.
Additional details
No response
Read this concerning the recently released Flet v0.25: https://flet.dev/blog/flet-v-0-25-release-announcement#new-packaging