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

local_recipes is not passed to p4a command #1366

Open
dlech opened this issue Oct 9, 2021 · 2 comments
Open

local_recipes is not passed to p4a command #1366

dlech opened this issue Oct 9, 2021 · 2 comments

Comments

@dlech
Copy link

dlech commented Oct 9, 2021

Versions

  • Python: 3.8
  • OS: Ubuntu 20.04
  • Buildozer: 1.2.0

Description

I'm trying to clean a local recipe to rebuild it without rebuilding everything else. I would expect the following command to work:

buildozer.spec

Command:

buildozer android p4a -- clean-recipe-build bleak

Spec file:

...
# (str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes = recipes
p4a.local_recipes = ../../bleak/backends/p4android/recipes
...

Logs

...
ValueError: Recipe does not exist: bleak
# Command failed: /home/david/work/pybricks/bleak/.venv/bin/python -m pythonforandroid.toolchain clean-recipe-build bleak --color=always --storage-dir="/home/david/work/pybricks/bleak/examples/kivy/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
...
@dlech
Copy link
Author

dlech commented Oct 9, 2021

To make it work, I have to run:

buildozer android p4a -- clean-recipe-build bleak --local-recipes=../../../../../../bleak/backends/p4android/recipes

It is inconvenient to have to add the extra argument and to remember to add ../../../../ to the path given in the spec file. It would be much nicer if the argument from the spec file was passed to this p4a command like it is to other commands.

@leycec
Copy link

leycec commented Apr 27, 2022

So much, "Ugh!" Ironically, I just hit this exact same issue while also attempting (but failing) to force Buildozer to acknowledge the exact same Bleak recipe. Incidentally, let's note that @dlech is the active maintainer for Bleak. Mad props, @dlech.

I can also confirm that this...

It would be much nicer if the argument from the spec file was passed to this p4a command like it is to other commands.

...doesn't actually appear to be the case. The buildozer android p4a command always unconditionally ignores the p4a.local_recipes setting in the top-level buildozer.spec file. This applies to not merely the clean-recipe-build subcommand but to all the other subcommands as well (e.g., buildozer android p4a -- recipes).

This is probably thanks to the extreme caching performed by both Buildozer and p4a. The buildozer android p4a command probably reuses a previously synthesized dist, build, or bootstrap rather than re-reading the top-level buildozer.spec file. Since internal and external documentation is scant on the subject, we're just left with bad assumptions. 😮‍💨

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