Repository navigation
Package Android dependencies installed by Briefcase #134
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
Open
kattni
wants to merge
6
commits into
beeware:main
Choose a base branch
from
kattni:codex/preinstalled-android-dependencies
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+70
−17
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bd84179
Package Android dependencies installed by Briefcase
kattni 2397bbc
Align Android build verification with xbuild Python support
kattni 9fa7d28
Retain legacy Android target verification
kattni 4694bb0
Use xbuild-supported Android ABIs on every Python version
kattni 612d9a2
Merge branch 'main' into codex/preinstalled-android-dependencies
kattni 632d0f4
Restore 32-bit ARM for Python 3.11.
kattni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,6 @@ tmp | |
| .project | ||
| .settings | ||
| .classpath | ||
| .tox/ | ||
| .pytest_cache/ | ||
| __pycache__/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import tomllib | ||
| from pathlib import Path | ||
|
|
||
| import pytest | ||
| from cookiecutter.main import cookiecutter | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( | ||
| ("python_version", "abis"), | ||
| [ | ||
| ("3.11.17", '"arm64-v8a", "armeabi-v7a", "x86_64"'), | ||
| ("3.12.15", '"arm64-v8a", "x86_64"'), | ||
| ("3.13.16", '"arm64-v8a", "x86_64"'), | ||
| ], | ||
| ) | ||
| def test_preinstalled_requirements(tmp_path, python_version, abis): | ||
| """The rendered project accepts dependency directories prepared by Briefcase.""" | ||
| project = Path( | ||
| cookiecutter( | ||
| str(Path(__file__).resolve().parents[1]), | ||
| no_input=True, | ||
| default_config={"replay_dir": str(tmp_path / "replay")}, | ||
| output_dir=str(tmp_path), | ||
| extra_context={ | ||
| "python_version": python_version, | ||
| "permissions": {}, | ||
| "features": {}, | ||
| }, | ||
| ) | ||
| ) | ||
| config = tomllib.loads((project / "briefcase.toml").read_text(encoding="utf-8")) | ||
| assert config["paths"]["app_packages_path"] == "app/app_packages" | ||
| assert "app_requirements_path" not in config["paths"] | ||
| assert "app_requirement_installer_args_path" not in config["paths"] | ||
| gradle = (project / "app/build.gradle").read_text(encoding="utf-8") | ||
| assert 'install "-r", "requirements.txt"' not in gradle | ||
| assert 'outputDir.set(layout.projectDirectory.dir("app_packages"))' in gradle | ||
| assert "enabled = false" in gradle | ||
| assert "afterEvaluate {" in gradle | ||
| assert f"abiFilters {abis}\n" in gradle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [tox] | ||
| env_list = py313 | ||
|
|
||
| [testenv] | ||
| skip_install = true | ||
| deps = | ||
| briefcase | ||
| pytest | ||
| commands = python -m pytest {posargs:tests} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than depending on Chaquopy's undocumented internals, I'd be open to adding a public API for this. But first we need to deal with the Windows compatibility issue in beeware/briefcase#3099, because that might make this whole approach impossible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Windows problem is fixed in beeware/xbuild#119, which is now merged, so this approach works on Windows. I'd be happy to move to a public API if you add one.