-
Notifications
You must be signed in to change notification settings - Fork 1
Fix Android tests #23
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ def test_cross_module_exceptions(msg): | |
|
||
# TODO: FIXME | ||
@pytest.mark.xfail( | ||
"env.MACOS and env.PYPY", | ||
"(env.MACOS and env.PYPY) or env.ANDROID", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand what's going on here, but going by the linked issues and PRs, neither do the pybind11 maintainers, so I don't feel too bad. |
||
raises=RuntimeError, | ||
reason="See Issue #2847, PR #2999, PR #4324", | ||
strict=not env.PYPY, # PR 5569 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,6 +243,16 @@ if(TARGET ${_Python}::Python) | |
endif() | ||
|
||
if(TARGET ${_Python}::Module) | ||
# Older versions of CMake don't know that Android requires modules to link to | ||
# libpython, so they generate Python::Module as an INTERFACE library. | ||
|
||
get_target_property(module_target_type ${_Python}::Module TYPE) | ||
if(ANDROID AND module_target_type STREQUAL INTERFACE_LIBRARY) | ||
set_property( | ||
TARGET ${_Python}::Module | ||
APPEND | ||
PROPERTY INTERFACE_LINK_LIBRARIES "${${_Python}_LIBRARIES}") | ||
endif() | ||
|
||
set_property( | ||
TARGET pybind11::module | ||
APPEND | ||
|
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.
Unfortunately the Chaquopy NumPy wheel won't work with the CPython testbed, as it packages OpenBLAS in a Chaquopy-specific location.
xbuild-tools is not implemented on Android: pypa/cibuildwheel#2349 (comment)