feat: Android improvements needed for building NumPy and related packages (#2695)
* Use auditwheel on Android * Add auditwheel command to defaults * pkgconfig fixes * Pre-import ctypes before monkey-patching in _cross_venv * Set PKG_CONFIG and PKG_CONFIG_RELOCATE_PATHS variables * Initial attempt at using mzakharo/android-gfortran * Switch to using termux/ndk-toolchain-clang-with-flang * Move PKG_CONFIG variables from build_env to android_env * Simplify flang installation * Add cross build files for NumPy * Add ldpaths entry for libomp * Add `--rm` to docker command line * Make Rust and Fortran shims consistent * Update documentation * Default to API level 24 on all Python versions * Clarify comments * Cleanups * Fix tests: * Set up Android env after installing pkgconf * Add tests for successfully using an older API level * Previous commit's auditwheel failure is fixed in the auditwheel PR * Update how-it-works diagram * Add tests for repair errors * Add more repair tests * Add test for Meson and Fortran * Add test for cross build files * Improve test_api_level error message * Add xbuild-files option * use pypa/auditwheel@main * Remove dependencies which are no longer needed * Fix README * Update to auditwheel 6.7.0 * Fix compatibility with pkgconf 2.5.1.post2 * Documentation clarifications Co-authored-by: Joe Rickerby <joerick@mac.com> * Fortran shim improvements * Add Jinja variables to new_meson_project * Update run_example_ci_configs for changed new_meson_project signature * Add missing dependency to run_example_ci_configs --------- Co-authored-by: mayeut <mayeut@users.noreply.github.com> Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Joe Rickerby
mayeut
parent
e3e7cc9e07
commit
1cf64d0d3c
@@ -212,6 +212,28 @@ def test_parse_key_value_string() -> None:
|
||||
}
|
||||
|
||||
|
||||
def test_parse_key_value_string_unknown_name() -> None:
|
||||
# Unknown fields are not allowed by default.
|
||||
with pytest.raises(ValueError, match=r"Failed to parse 'key: value'. Unknown field name 'key'"):
|
||||
parse_key_value_string("key: value")
|
||||
|
||||
# Unknown fields can be enabled by passing "*".
|
||||
assert parse_key_value_string(
|
||||
"key: value",
|
||||
kw_arg_names=["*"],
|
||||
) == {
|
||||
"key": ["value"],
|
||||
}
|
||||
|
||||
assert parse_key_value_string(
|
||||
"key1: value1a value1b; key2: value2",
|
||||
kw_arg_names=["*"],
|
||||
) == {
|
||||
"key1": ["value1a", "value1b"],
|
||||
"key2": ["value2"],
|
||||
}
|
||||
|
||||
|
||||
def test_flexible_version_comparisons() -> None:
|
||||
assert FlexibleVersion("2.0") == FlexibleVersion("2")
|
||||
assert FlexibleVersion("2.0") < FlexibleVersion("2.1")
|
||||
|
||||
Reference in New Issue
Block a user