-
Notifications
You must be signed in to change notification settings - Fork 163
Add Android support #643
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
mhsmith
wants to merge
24
commits into
pypa:main
Choose a base branch
from
mhsmith:android
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.
Open
Add Android support #643
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a95e8d0
Begin Android support
mhsmith a35924f
Improve API level auto-detection
mhsmith d2a0db9
Fix some tests
mhsmith 237874e
Working with manual repair of numpy-1.26.2-0-cp313-cp313-android_24_a…
mhsmith 588758c
Use LD_LIBRARY_PATHS variable even when --ldpaths is passed
mhsmith 38a59c5
Use RUNPATH rather than RPATH
mhsmith e675469
Merge remote-tracking branch 'origin/main' into android
mhsmith 2033e47
Rename and test android_api_level
mhsmith 3a5e1b2
Revert unnecessary reformatting
mhsmith d4092fc
Add tests
mhsmith 5e54a3e
Remove automatic increase to API level 24
mhsmith c2a76d4
Add tests for policies
mhsmith e088b03
Add --ldpaths to all subcommands, and make it required on Android
mhsmith 79627e4
Move API level 24 check to patcher
mhsmith 5fb678f
Rename main_options.py to options.py
mhsmith 364ab91
Improve error messages
mhsmith 4568843
Respond to Copilot and Codecov reports; update documentation
mhsmith c3911bc
Merge remote-tracking branch 'origin/main' into android
mhsmith 5cf82d6
Add integration test
mhsmith bd58c59
Merge branch 'main' into android
mayeut 91ccc3a
Always pass --ldpaths in integration test
mhsmith 725c7ef
Add coverage of elf_read_soname
mhsmith 9841ab1
Correct handling of libpython
mhsmith e0bf5ba
Make --ldpaths default to empty on Android
mhsmith 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
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
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
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
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
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
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,37 @@ | ||
| """Options shared between multiple subcommands.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| if TYPE_CHECKING: | ||
| from argparse import ArgumentParser | ||
|
|
||
|
|
||
| def disable_isa_check(parser: ArgumentParser) -> None: | ||
| parser.add_argument( | ||
| "--disable-isa-ext-check", | ||
| dest="DISABLE_ISA_EXT_CHECK", | ||
| action="store_true", | ||
| help="Do not check for extended ISA compatibility (e.g. x86_64_v2)", | ||
| default=False, | ||
| ) | ||
|
|
||
|
|
||
| def allow_pure_python_wheel(parser: ArgumentParser) -> None: | ||
| parser.add_argument( | ||
| "--allow-pure-python-wheel", | ||
| dest="ALLOW_PURE_PY_WHEEL", | ||
| action="store_true", | ||
| help="Allow processing of pure Python wheels (no platform-specific binaries) without error", | ||
| default=False, | ||
| ) | ||
|
|
||
|
|
||
| def ldpaths(parser: ArgumentParser) -> None: | ||
| parser.add_argument( | ||
| "--ldpaths", | ||
| dest="LDPATHS", | ||
| help="Colon-delimited list of directories to search for external libraries. " | ||
| "This replaces the default list; to add to the default, use LD_LIBRARY_PATH.", | ||
| ) |
Oops, something went wrong.
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.
I'm not sure whether including
$ORIGINin LD_LIBRARY_PATH is valid at all, but the TODO inload_ld_pathsmakes it clear that it isn't currently supported. So if the user attempts to do this, I think it's better to throw an exception, rather than silently skipping the path entry.The current code is even worse, because it transforms
$ORIGINinto the parent of the working directory, which is whatdirname(abspath(""))returns.