kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
780 stars 240 forks source link

local recipe support #596

Open Andrei-Pozolotin opened 3 years ago

Andrei-Pozolotin commented 3 years ago
  1. currently there seems to be no way to support a local recipe:

https://github.com/kivy/kivy-ios/blob/2cb084c26b7e9b45b027961cded13521b8db5b6b/kivy_ios/toolchain.py

  1. in a simple way, i.e. how p4a is doing it:

https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/toolchain.py

        generic_parser.add_argument(
            '--local-recipes', '--local_recipes',
            dest='local_recipes', default='./p4a-recipes',
            help='Directory to look for local recipes')
misl6 commented 3 years ago

If I get it right your request, We already have this feature and it's exposed by --add-custom-recipe.

You can add multiple custom recipes by using it:

python toolchain.py build mycustompackage1 mycustompackage2 --add-custom-recipe /PATH/TO/MY/RECIPE1 --add-custom-recipe /PATH/TO/MY/RECIPE2

Andrei-Pozolotin commented 3 years ago

@misl6 Mirko: thank you, I did not see --add-custom-recipe before

a couple of questions, please:

  1. this does not seem to work for custom recipe to override/replace existing/provided recipe? for example in order to locally resolve #595

    toolchain build python3 --add-custom-recipe /path-to/custom-recipe/python3
  2. clean is not supported, then how to clean?

    toolchain clean recipe_x --add-custom-recipe /path-to/custom-recipe/recipe_x
misl6 commented 3 years ago

Hi @Andrei-Pozolotin ,

Yes, it doesn't override an existing recipe and after checking python-for-android code, It probably should do in order to be fully consistent.

Also, clean is not supported and should be.

Leaving that open and marking it as milestone 1.3.0. Thank you for reporting.

tcaduser commented 1 year ago

I am able to add a custom recipe, but it was not getting installed onto the app. To do this I had to move the recipe from my local directory into the virtual environment of my host python:

$VIRTUAL_ENV/lib/python3.9/site-packages/kivy_ios/recipes/myapp/__init__.py