b3b / able

Python for Android Bluetooth Low Energy package
MIT License
39 stars 18 forks source link

Buildozer Failed Building Alert Example #32

Closed hailesir closed 2 years ago

hailesir commented 2 years ago

I tried building the project with the same buildozer.spec and main.py file but I got the error when it came with the setup.py in able_recipe

Installing collected packages: plyer, certifi, able_recipe Running command Running setup.py install for able_recipe Ignoring "sys._home = value" override running install Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-9vo91z2q/able-recipe_352b77a036ee40c08e174b90b1836cdf/setup.py", line 57, in setup( File "/mnt/c/Users/*/Downloads/service_advertise/.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.8/site-packages/setuptools/init.py", line 165, in setup return distutils.core.setup(attrs) File "/mnt/c/Users/sirak_p9ehh80/Downloads/service_advertise/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/mnt/c/Users/sirak_p9ehh80/Downloads/service_advertise/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/mnt/c/Users/sirak_p9ehh80/Downloads/service_advertise/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-9vo91z2q/able-recipe_352b77a036ee40c08e174b90b1836cdf/setup.py", line 35, in run raise Exception( Exception: javaclasses directory is not found. Please report issue to: https://github.com/b3b/able/issues error: subprocess-exited-with-error

× Running setup.py install for able_recipe 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. full command: /mnt/c/Users/***/Downloads/service_advertise/.buildozer/android/platform/build-armeabi-v7a/build/venv/bin/python -u -c ' exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

#

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-9vo91z2q/able-recipe_352b77a036ee40c08e174b90b1836cdf/setup.py'"'"',), "", "exec"))' install --record /tmp/pip-record-q2092ddf/install-record.txt --single-version-externally-managed --home /tmp/pip-target-zbhwrrpi --compile --install-headers /tmp/pip-target-zbhwrrpi/include/site/python3.8/able_recipe cwd: /tmp/pip-install-9vo91z2q/able-recipe_352b77a036ee40c08e174b90b1836cdf/ Running setup.py install for able_recipe ... error error: legacy-install-failure

× Encountered error while trying to install package. ╰─> able_recipe

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

STDERR:

ERROR:[2] Could not read registry key cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061) cannot connect to daemon at tcp:5037: Connection refused

hailesir commented 2 years ago

I am sorry for the bad formatting

b3b commented 2 years ago

Thanks for detailed report, @hailesir . It seems that build directories are changed with the latest python-for-android versions. I will see how to fix it.

b3b commented 2 years ago

Fixed in 1.0.10 . Build error was caused by python-for-android build directories changes, to support AAB builds: https://github.com/kivy/python-for-android/issues/2084