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

Allow configuration of pip options #95

Merged
merged 4 commits into from
Nov 19, 2024
Merged

Conversation

sarayourfriend
Copy link
Contributor

@sarayourfriend sarayourfriend commented Nov 15, 2024

Related to beeware/briefcase#1270

This PR is roughly similar to beeware/briefcase-linux-flatpak-template#52, except that while the Flatpak PR claims to "decouple" pip install from requirement installation, that isn't as easy to do for the Android template, so far as I can tell. The implementation matches @mhsmith's recommendation from the linked issue to write the options to a text file to be read in build.gradle.

I've tested this by building an app with the template without any addition pip options, as well as by using Briefcase from this PR which adds the new requirement_installer_args configuration and is now updated to support this pip-options.txt file. You could also just checkout this branch locally and use the template that way, with manual modifications to pip-options.txt to verify that it works (i.e., that the options are applied).

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@mhsmith mhsmith left a comment

Choose a reason for hiding this comment

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

Yes, I think this is a good approach.

We may also want to put the path of the pip-options.txt file in briefcase.toml – let's discuss at beeware/briefcase#2059 (comment).

{{ cookiecutter.format }}/app/build.gradle Outdated Show resolved Hide resolved
{{ cookiecutter.format }}/app/build.gradle Outdated Show resolved Hide resolved
{{ cookiecutter.format }}/app/build.gradle Outdated Show resolved Hide resolved
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

This looks good to me, but I'll leave it to @mhsmith to give the final signoff (since Android is more of his area of expertise, and he's already taken a look at this PR).

@mhsmith mhsmith merged commit 9b4788a into beeware:main Nov 19, 2024
16 checks passed
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.

3 participants