Skip to content

Conversation

@T-Dynamos
Copy link
Member

@T-Dynamos T-Dynamos commented Dec 13, 2025

Closes #3274

Package resolution is performed using the hostpython's pip via the --dry-run option.

Example

requirements = python3,
    kivy==master,
    materialyoucolor,
    materialshapes,
    exceptiongroup,
    asyncgui,
    asynckivy,
    android,
    pillow==11.0.0,
    pycairo,
    https://github.com/kivymd/KivyMD/archive/master.zip,
    trio,
    openai

Output:
image

@T-Dynamos T-Dynamos changed the title [WIP] toolchain: auto resolve deps toolchain: auto resolve deps Dec 13, 2025
@T-Dynamos T-Dynamos changed the title toolchain: auto resolve deps toolchain: auto resolve deps Dec 13, 2025
@T-Dynamos T-Dynamos force-pushed the minor-fixes branch 7 times, most recently from 87f16ae to 7152f01 Compare December 20, 2025 11:40
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, looks good overall, pretty clear and nice feature thank you!
I just have a few remarks and concerns I'd like to discuss.

  1. It would be nice to have at least some basic unit tests for is_wheel_platform_independent() (that one should be relatively easy) and process_python_modules() (that one is more tricky, but let's try to have at least some basic coverage). I noticed the code currently bypasses the new logic when recipe_build_order is a Mock - having proper tests would let us remove that workaround.
  2. Have we thought of having a --no-auto-resolve or something like that for reproducible builds?
  3. A bit tricky to integration test, I imagine that would mean having an app build with the requirements list not fully defined/pinned and test it runtime, but then we have some build reproducibility concerns. Do you have some ideas for how to make sure your changes don't get broken later on without us realising?

Comment on lines +781 to +782
if ctx.recipe_build_order.__class__.__name__ != "Mock":
modules = process_python_modules(ctx, modules)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're better off updating the tests to maybe mock process_python_modules so it just returns modules as is or something like that than having a test bypass in the code itself

Comment on lines +712 to +716
shprint(
host_recipe.pip, 'install', *modules,
'--dry-run', '--break-system-packages', '--ignore-installed',
'--report', path, '-q', _env=env
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we handle any error gracefully here?
Like returning modules untouched.
We should probably still log the error for debugging, but not breaking the process if automatic module resolution doesn't work

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

Successfully merging this pull request may close these issues.

Python 3.14 Android build failures: _remote_debugging_module and SDL2 bootstrap (pyconfig.h missing)

2 participants