onnxruntime/tools/python
Scott McKay d4470fe653
Update Android SDK tools path lookup to be more strongly anchored to the provided root. (#21046)
### Description
<!-- Describe your changes. -->
The tools should really all come from the same Android NDK, so using
`shutil.which` adds potential confusion when we do a lookup for the
target program by name first due to adding `dirnames.insert(0, "")` as
the first directory entry to lookup as it will match the filename
anywhere in the current path.

That's problematic as the emulator should come from
<sdk_tools>/emulator/emulator (see
[here](https://www.stkent.com/2017/08/10/update-your-path-for-the-new-android-emulator-location.html)),
but the paths on the CI machines result in the old location of
<sdk_tools>/tools/emulator being selected. This leads to the emulator
failing to run on arm64 macOS CIs as the old emulator does not look for
the arm64 binary.

At the most you may have multiple cmdline-tools versions installed, but
if we need to support explicitly specifying a version for that path that
can be added.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Make emulator run on arm64 macOS machines.
2024-06-17 09:24:43 +10:00
..
util Update Android SDK tools path lookup to be more strongly anchored to the provided root. (#21046) 2024-06-17 09:24:43 +10:00
__init__.py
check_onnx_model_mobile_usability.py
convert_onnx_models_to_ort.py Add ability to create ort format models from training offline utility (#16360) 2023-06-21 18:51:43 -07:00
create_reduced_build_config.py Bump ruff in CI (#15533) 2023-04-17 10:11:44 -07:00
dump_ort_model.py Bump ruff to 0.3.2 and black to 24 (#19878) 2024-03-13 10:00:32 -07:00
dump_subgraphs.py [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
example_operator_perf_test.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
find_optimizer_opset_version_updates_required.py Bump ruff to 0.3.2 and black to 24 (#19878) 2024-03-13 10:00:32 -07:00
fix_long_lines.py Bump ruff linter to 0.2.1 (#19471) 2024-02-08 16:08:27 -08:00
gen_contrib_doc.py Bump ruff to 0.3.2 and black to 24 (#19878) 2024-03-13 10:00:32 -07:00
gen_opkernel_doc.py Bump ruff linter to 0.2.1 (#19471) 2024-02-08 16:08:27 -08:00
gen_ort_mobile_pkg_doc.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
get_submodules.py Bump ruff in CI (#15533) 2023-04-17 10:11:44 -07:00
onnx2tfevents.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
onnx_test_data_utils.py Various test infra updates from testing Azure ops with MAUI test app (#17262) 2023-08-27 09:35:00 +10:00
ort_test_dir_utils.py Bump ruff linter to 0.2.1 (#19471) 2024-02-08 16:08:27 -08:00
PythonTools.md Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
remove_initializer_from_input.py
run_adb.py
run_android_emulator.py Attempt to make the usage of the Android emulator in CIs more robust (#17903) 2023-10-15 08:42:36 +10:00
run_CIs_for_branch.py Update script to run CIs for a branch. (#19797) 2024-03-08 17:52:47 +10:00
run_CIs_for_external_pr.py [tools] update pipeline list for run_CIs_for_external_pr.py (#20776) 2024-05-23 10:38:42 -07:00
sparsify_initializers.py [Linter] Bump ruff and remove pylint (#17797) 2023-10-05 21:07:33 -07:00
update_version.py [js] add API that allows to get package version (#16207) 2023-06-09 16:18:53 -07:00