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 1.5.0 can't compile libzbar #1705

Closed
102757017 opened this issue Sep 23, 2023 · 3 comments
Closed

buildozer 1.5.0 can't compile libzbar #1705

102757017 opened this issue Sep 23, 2023 · 3 comments
Labels

Comments

@102757017
Copy link

102757017 commented Sep 23, 2023

Versions

  • Python:3.9
  • OS: Ubuntu-21.04
  • Buildozer:1.5.0

I have used libzbar in my App, I can build the apk successful with buildozer 1.4.0.
but when I used buildozer 1.5.0 to buil1 the apk, It can not find the recipe of libzbar. It uses pip to install libzbar.
libzbar can not be instal1ed with pip, so it fails.
I want to know why does it happen and how to solve it.

### buildozer.spec
[app]

# (str) Title of your application
title = WICO

# (str) Package name
package.name = WICO

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

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

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

# (str) Presplash of the application
#presplash.filename = %(source.dir)s/assets/images/presplash.png

# (str) Icon of the application
#icon.filename = %(source.dir)s/assets/images/logo.png

# (string) Presplash background color (for new android toolchain)
#android.presplash_color = #000000

# (list) Source files to include (let empty to include all the files)
#source.include_exts = py, gif, png, jpg, jpeg, ttf, kv, json, txt, md

source.exclude_exts = xlsx, md


# (bool) Enable AndroidX support. Enable when 'android.gradle_dependencies'
# contains an 'androidx' package, or any package from Kotlin source.
# android.enable_androidx requires android.api >= 28
# android.enable_androidx = True

# (str) Application versioning (method 2)
version = 0.1
p4a.local_recipes = ./p4a-recipes

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3, \
               kivy==2.1.0, \
               KivyMD, \
               pillow, \
               sqlite3, \
               #sdl2_ttf==2.0.15, \
               #android, \
               certifi, \
               openssl, \
               #opencv-python, \
               pyzbar, \
               libzbar, \
               mysql_connector, \
               camera4kivy, \
               gestures4kivy, \
               sentry-sdk, \
               urllib3

# (str) Supported orientation (one of landscape, sensorLandscape, portrait or all)
orientation = portrait

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

# (int) Target Android API, should be as high as possible.
android.api = 32

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
#android.skip_update = False

# (bool) If True, then automatically accept SDK license
# agreements. This is intended for automation only. If set to False,
# the default, you will be shown the license when first running
# buildozer.
#android.accept_sdk_license = True

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
android.archs = arm64-v8a

android.release_artifact = apk

# (str) python-for-android branch to use, defaults to master
p4a.branch = develop

# (str) Filename to the hook for p4a
p4a.hook = camerax_provider/gradle_options.py

# (list) Permissions
android.permissions = CAMERA,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE,FLASHLIGHT

#
# 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

# Another platform dependency: ios-deploy
# Uncomment to use a custom checkout
#ios.ios_deploy_dir = ../ios_deploy
# Or specify URL and branch
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.10.0

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

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) The development team to use for signing the debug version
#ios.codesign.development_team.debug = <hexstring>

# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s

# (str) The development team to use for signing the release version
#ios.codesign.development_team.release = <hexstring>

# (str) URL pointing to .ipa file to be installed
# This option should be defined along with `display_image_url` and `full_size_image_url` options.
#ios.manifest.app_url =

# (str) URL pointing to an icon (57x57px) to be displayed during download
# This option should be defined along with `app_url` and `full_size_image_url` options.
#ios.manifest.display_image_url =

# (str) URL pointing to a large icon (512x512px) to be used by iTunes
# This option should be defined along with `app_url` and `display_image_url` options.
#ios.manifest.full_size_image_url =



#
# OSX Specific
#

#
# author = © Copyright Info

# change the major version of python used by the app
osx.python_version = 3

# Kivy version to use
osx.kivy_version = 1.9.1


[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 = 0

Logs

[DEBUG]: All possible dists: []
[DEBUG]: Dist matching name and arch: []
[DEBUG]: Dist matching ndk_api and recipe: []
[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: ['\\ncamera4kivy', '\\ncertifi', '\\ngestures4kivy', '\\nkivy', '\\nkivymd', '\\nlibzbar', '\\nmysql_connector', '\\nopenssl', '\\npillow', '\\npyzbar', '\\nsentry-sdk', '\\nsqlite3', '\\nurllib3', 'hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android']
[INFO]: The selected bootstrap is sdl2
[INFO]: # Creating dist with sdl2 bootstrap
[INFO]: Dist will have name WICO and requirements (python3,
kivy,
KivyMD,
pillow,
sqlite3,
certifi,
openssl,
pyzbar,
libzbar,
mysql_connector,
camera4kivy,
gestures4kivy,
sentry-sdk,
urllib3)
[INFO]: Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android']
[INFO]: Dist will also contain modules (
sqlite3,
sentry-sdk,
libzbar,
camera4kivy,
urllib3,
gestures4kivy,
pillow,
kivy,
pyzbar,
mysql_connector,
certifi,
kivymd,
openssl) installed from pip
[INFO]: Dist will be build in mode debug
[INFO]: -> directory context /home/runner/work/wico/wico/wico/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2
[INFO]: <- directory context /home/runner/work/wico/wico/wico/.buildozer/android/platform/python-for-android
[DEBUG]: Create directory /home/runner/work/wico/wico/wico/.buildozer/android/platform/build-arm64-v8a/dists/WICO
[INFO]: Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android']
[INFO]: The requirements (
camera4kivy,
certifi,
gestures4kivy,
kivy,
kivymd,
libzbar,
mysql_connector,
openssl,
pillow,
pyzbar,
sentry-sdk,
sqlite3,
urllib3) were not found as recipes, they will be installed with pip.

@RobertFlatt
Copy link
Contributor

Here is an example of using libzbar https://github.com/Android-for-Python/c4k_qr_example
For support questions use the User Groups.

@Julian-O
Copy link
Contributor

This is a support question. Please do not ask or answer support questions here; this is for bug reports on Buildozer only.

Please visit https://github.com/kivy/buildozer#support to find where to take support questions. This issue should be closed.

@misl6 misl6 added the support label Oct 10, 2023
@github-actions
Copy link

👋 @102757017, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.

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

No branches or pull requests

4 participants