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

sh.ErrorReturnCode_255 #40

Open
imxade opened this issue Aug 17, 2024 · 1 comment
Open

sh.ErrorReturnCode_255 #40

imxade opened this issue Aug 17, 2024 · 1 comment

Comments

@imxade
Copy link

imxade commented Aug 17, 2024

  • log
STDOUT:
/github/workspace/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/sympy/armeabi-v7a__ndk_target_21/sympy/setup.py:49: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
 from distutils.core import setup, Command
Please install the mpmath package with a version >= 0.19


 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 "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1256, in <module>
   main()
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
   ToolchainCL()
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 685, in __init__
   getattr(self, command)(args)
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 104, in wrapper_func
   build_dist_from_args(ctx, dist, args)
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
   build_recipes(build_order, python_modules, ctx,
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes
   recipe.build_arch(arch)
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 934, in build_arch
   self.install_python_package(arch)
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 950, in install_python_package
   shprint(hostpython, 'setup.py', 'install', '-O2',
 File "/github/workspace/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
   for line in output:
 File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 911, in next
   self.wait()
 File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 841, in wait
   self.handle_command_exit_code(exit_code)
 File "/home/user/.local/lib/python3.8/site-packages/sh.py", line 865, in handle_command_exit_code
   raise exc
sh.ErrorReturnCode_255: 

 RAN: /github/workspace/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py install -O2 --root=/github/workspace/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/PictoPy/armeabi-v7a --install-lib=.

 STDOUT:
/github/workspace/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/sympy/armeabi-v7a__ndk_target_21/sympy/setup.py:49: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
 from distutils.core import setup, Command
Please install the mpmath package with a version >= 0.19


 STDERR:

# Command failed: ['/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=PictoPy', '--bootstrap=sdl2', '--requirements=python3,kivy,blinker,bottle,click,coloredlogs,Flask,flatbuffers,humanfriendly,itsdangerous,Jinja2,MarkupSafe,mpmath,numpy,onnxruntime,opencv-python-headless,packaging,protobuf,proxy_tools,PyQt5,PyQt5-Qt5,PyQt5-sip,PyQtWebEngine,PyQtWebEngine-Qt5,pywebview,QtPy,sympy,typing_extensions,Werkzeug,xxhash,', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/github/workspace/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

  • spec
# This .spec config file tells Buildozer an app's requirements for being built.
#
# It largely follows the syntax of an .ini file.
# See the end of the file for more details and warnings about common mistakes.

[app]

# (str) Title of your application
title = PictoPy

# (str) Package name
package.name = PictoPy

# (str) Package domain (needed for android/ios packaging)
package.domain = org.xade

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,html,jar,css

# (list) List of inclusions using pattern matching
source.include_patterns = static/*, models/*

# (list) Source files to exclude (leave empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)
source.exclude_dirs = bin,build,dist,docs,logo,tests,pywebview.egg-info

# (list) List of exclusions using pattern matching
# Do not prefix with './'
#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)
version = 0.1

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy, blinker, bottle, click, coloredlogs, Flask, flatbuffers, humanfriendly, itsdangerous, Jinja2, MarkupSafe, mpmath, numpy, onnxruntime, opencv-python-headless, packaging, protobuf, proxy_tools, PyQt5, PyQt5-Qt5, PyQt5-sip, PyQtWebEngine, PyQtWebEngine-Qt5, pywebview, QtPy, sympy, typing_extensions, Werkzeug, xxhash

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
#requirements.source.webview = webview

# (str) Presplash of the application
presplash.filename = %(source.dir)s/static/asset/favicon

# (str) Icon of the application
icon.filename = %(source.dir)s/static/asset/favicon

# (list) Supported orientations
# Valid options are: landscape, portrait, portrait-reverse or landscape-reverse
orientation = portrait

#
# OSX Specific
#

#
# author = © Copyright Info

# Kivy version to use
osx.kivy_version = 2.2.0

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0

android.add_jars = ../../webview/lib/pywebview-android.jar

# (list) The Android archs to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
# In past, was `android.arch` as we weren't supporting builds for multiple archs at the same time.
android.archs = arm64-v8a, armeabi-v7a


#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios
# Alternately, specify the URL and branch of a git checkout:
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master

ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.12.2

# (bool) Whether or not to sign the code
ios.codesign.allowed = false

[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .aab, .ipa) storage
# bin_dir = ./bin
@Novfensec
Copy link

Problems solved!

🎉 Exciting News! 🎉

I'm thrilled to announce that my APK build process for the SAMPLE-KIVYMD-APP repository has been successfully completed on GitHub! 🚀

It took some frustrating build failures but still I managed to succeed.

After resolving several challenges, my GitHub Actions workflow now reliably builds the APK for my KivyMD application, thanks to the latest updates and optimizations. This achievement marks a significant milestone for my project, bringing us one step closer to delivering an enhanced mobile experience.

🔧 Key Highlights:

  • Automated APK Building: Our workflow now efficiently handles the APK build process without manual intervention.
  • Optimized Dependencies: We’ve integrated all necessary dependencies, ensuring a smooth build environment.
  • Seamless Deployment: The build process is fully automated, making it easier to deploy updates and improvements.

For more details, you can check out the repository here. I am looking forward to your feedback.

Stay tuned for more updates and happy coding!

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

No branches or pull requests

2 participants