Open ahmedashraf344 opened 4 months ago
i follow this steps btw https://flet.dev/docs/guides/python/packaging-app-for-distribution#native-python-packages but nothing work
Same
Same problem, but I cant build when using firebase_admin
up
OpenCV should be built following this guide: https://flet.dev/docs/publish/android#prerequisites
firebase_admin
is more challenging. This is firebase-admin
dependencies:
% pipgrip firebase_admin
firebase-admin==6.5.0
cachecontrol==0.14.0
msgpack==1.0.8
requests==2.31.0
certifi==2024.2.2
charset-normalizer==3.3.2
idna==3.7
urllib3==2.2.1
google-api-core==2.18.0
google-auth==2.29.0
cachetools==5.3.3
pyasn1-modules==0.4.0
pyasn1==0.6.0
rsa==4.9
googleapis-common-protos==1.63.0
protobuf==4.25.3
grpcio-status==1.62.2
grpcio==1.62.2
proto-plus==1.23.0
google-api-python-client==2.127.0
google-auth-httplib2==0.2.0
httplib2==0.22.0
pyparsing==3.1.2
uritemplate==4.1.1
google-cloud-firestore==2.16.0
google-cloud-core==2.4.1
google-cloud-storage==2.16.0
google-crc32c==1.5.0
google-resumable-media==2.7.0
pyjwt==2.8.0
cryptography==42.0.5
cffi==1.16.0
pycparser==2.22
Kivy does not have (or outdated) recipes for some native packages required for that package:
grpcio
- absentgoogle-crc32c
- absentmsgpack
- outdatedprotobuf
- outdatedpycparser
- outdatedWe are currently working on packaging improvements using a different approach, not relying on Kivy anymore. It will be available in a few weeks. I know it hurts, but thank you for your patience.
For curious this is the list of Python packages I'm trying to assemble from various frameworks, to understand what should be supported in Flet first of all: https://docs.google.com/spreadsheets/d/1bZwiWyxWzReJmSd6iOlZVRNWLa9oYV0ci49coRJzZss/edit?usp=sharing
I'm going to create a voting section on the forums to collect everyone's feedback.
Same problem, but I cant build when using firebase_admin
did you find solution bro
Any solution so far??😵💫 I also can’t build apk using python-opencv
when try to use flet build apk and add opencv-python in requirement.txt i got this issue when i remove it apk generate successfully
(base) ahmedashraf@ahmeds-mbp app % flet build apk
Creating Flutter bootstrap project...OK Customizing app icons and splash images...OK Generating app icons...OK Generating splash screens...OK Packaging Python app...Running package command Creating asset directory: /private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/flet_flutter_build_GUVoHvcXgz/app Copying Python app from /Users/ahmedashraf/Desktop/app to /var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/serious_python_tempbxdo5l Configured mobile platform with sitecustomize.py at /var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/serious_python_sitecustomizeKeuVrR/sitecustomize.py Installing dependencies with pip command to /var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/serious_python_tempbxdo5l/pypackages Extracting Python distributive from /var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/cpython-3.11.6+20231002-aarch64-apple-darwin-install_only.tar.gz to /var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b
/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib/python3.11/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [368 lines of output] Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment Ignoring numpy: markers 'python_version == "3.9" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment Ignoring numpy: markers 'python_version == "3.10" and platform_system != "Darwin"' don't match your environment Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Darwin"' don't match your environment Collecting cmake>=3.1 Using cached cmake-3.28.3.tar.gz (42 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting numpy==1.22.2 Using cached numpy-1.22.2.zip (11.4 MB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting pip Obtaining dependency information for pip from https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl.metadata Using cached pip-24.0-py3-none-any.whl.metadata (3.6 kB) Collecting scikit-build>=0.14.0 Obtaining dependency information for scikit-build>=0.14.0 from https://files.pythonhosted.org/packages/fa/af/b3ef8fe0bb96bf7308e1f9d196fc069f0c75d9c74cfaad851e418cc704f4/scikit_build-0.17.6-py3-none-any.whl.metadata Using cached scikit_build-0.17.6-py3-none-any.whl.metadata (14 kB) Collecting setuptools==59.2.0 Using cached setuptools-59.2.0-py3-none-any.whl (952 kB) Collecting distro (from scikit-build>=0.14.0) Obtaining dependency information for distro from https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl.metadata Using cached distro-1.9.0-py3-none-any.whl.metadata (6.8 kB) Collecting packaging (from scikit-build>=0.14.0) Obtaining dependency information for packaging from https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl.metadata Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB) Collecting wheel>=0.32.0 (from scikit-build>=0.14.0) Obtaining dependency information for wheel>=0.32.0 from https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl.metadata Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB) Using cached pip-24.0-py3-none-any.whl (2.1 MB) Using cached scikit_build-0.17.6-py3-none-any.whl (84 kB) Using cached wheel-0.42.0-py3-none-any.whl (65 kB) Using cached distro-1.9.0-py3-none-any.whl (20 kB) Using cached packaging-23.2-py3-none-any.whl (53 kB) Building wheels for collected packages: numpy, cmake Building wheel for numpy (pyproject.toml): started Building wheel for numpy (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error
-Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -I/var/folders/c8/z52g4gc5679gygt8z0dx0jqm0000gn/T/tmpli8ssce8/tools/deps/include -I/var/folders/c8/z52g4gc5679gygt8z0dx0jqm0000gn/T/tmpli8ssce8/tools/deps/include/ncursesw -I/var/folders/c8/z52g4gc5679gygt8z0dx0jqm0000gn/T/tmpli8ssce8/tools/deps/include/uuid -Werror=unguarded-availability-new
'/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: blas_mkl_info: INFO: libraries mkl_rt not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: blis_info: INFO: libraries blis not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: openblas_info: INFO: libraries openblas not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: accelerate_info: INFO: libraries accelerate not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: Library accelerate was not found. Ignoring INFO: libraries veclib not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: Library veclib was not found. Ignoring INFO: FOUND: INFO: extra_compile_args = ['-I/System/Library/Frameworks/vecLib.framework/Headers'] INFO: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] INFO: define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)] INFO: INFO: FOUND: INFO: extra_compile_args = ['-I/System/Library/Frameworks/vecLib.framework/Headers'] INFO: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] INFO: define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)] INFO: non-existing path in 'numpy/distutils': 'site.cfg' INFO: lapack_opt_info: INFO: lapack_armpl_info: INFO: libraries armpl_lp64_mp not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: lapack_mkl_info: INFO: libraries mkl_rt not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: openblas_lapack_info: INFO: libraries openblas not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: openblas_clapack_info: INFO: libraries openblas,lapack not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: flame_info: INFO: libraries flame not found in ['/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib', '/usr/local/lib', '/usr/lib'] INFO: NOT AVAILABLE INFO: INFO: FOUND: INFO: extra_compile_args = ['-I/System/Library/Frameworks/vecLib.framework/Headers'] INFO: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] INFO: define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)] INFO: Warning: attempted relative import with no known parent package /private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dis t.py:275: UserWarning: Unknown distribution option: 'define_macros' warnings.warn(msg) running bdist_wheel running build running config_cc INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src INFO: build_src INFO: building py_modules sources creating build creating build/src.macosx-11.0-arm64-3.11 creating build/src.macosx-11.0-arm64-3.11/numpy creating build/src.macosx-11.0-arm64-3.11/numpy/distutils INFO: building library "npymath" sources WARN: Could not locate executable Cannot_compile_native_modules
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_proces s/_in_process.py", line 353, in
main()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_proces
s/_in_process.py", line 335, in main
json_out['return_val'] = hook(hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_proces
s/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 230,
in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 215,
in _build_with_temp_dir
self.run_setup()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 268,
in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 158,
in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 461, in
setup_package()
File "setup.py", line 453, in setup_package
setup( metadata)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/distutils/core.py", line 169,
in setup
return old_setup(new_attr)
^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/init.py", line 153,
in setup
return distutils.core.setup(attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line
148, in setup
dist.run_commands()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line
967, in run_commands
self.run_command(cmd)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line
986, in run_command
cmd_obj.run()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 299, in
run
self.run_command('build')
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line
313, in run_command
self.distribution.run_command(command)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line
986, in run_command
cmd_obj.run()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/distutils/command/build.py",
line 61, in run
old_build.run(self)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.
py", line 135, in run
self.run_command(cmd_name)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line
313, in run_command
self.distribution.run_command(command)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-xsk018b3/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line
986, in run_command
cmd_obj.run()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/distutils/command/build_src.py
", line 144, in run
self.build_sources()
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/distutils/command/build_src.py
", line 155, in build_sources
self.build_library_sources(*libname_info)
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/distutils/command/build_src.py
", line 288, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/distutils/command/build_src.py
", line 378, in generate_sources
source = func(extension, build_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-install-qk5_zp3v/numpy_33409ef6895c47f7bea7032dc9ab5cad/numpy/core/setup.py", line 708, in
get_mathlib_info
raise RuntimeError(
RuntimeError: Broken toolchain: cannot link a simple C program.
: UserWarning: git archive did not support describe output warnings.warn("git archive did not support describe output") /private/var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/pip-build-env-vi45iqib/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:327 : UserWarning: unprocessed git archival found (no export subst applied) warnings.warn("unprocessed git archival found (no export subst applied)")
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
A new release of pip is available: 23.2.1 -> 24.0 To update, run: /var/folders/bh/m3lvt7gs139_2xqjg2vxt9q80000gn/T/hostpython3.11_wmxN2b/python/bin/python3 -m pip install --upgrade pip
Error building Flet app - see the log of failed command above. (base) ahmedashraf@ahmeds-mbp app %