-
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
Fix Android tests #23
Conversation
tools/pybind11NewTools.cmake
Outdated
# Older versions of CMake don't know that Android requires modules to link to | ||
# libpython, so they generate Python::Module as an INTERFACE library. |
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'll submit a PR in the next couple of days to fix this upstream in CMake. The necessary change in FindPython/Support.cmake is quite simple:
@@ -1515,13 +1515,13 @@ unset (_${_PYTHON_PREFIX}_FIND_DEVELOPMENT_MODULE_ARTIFACTS)
unset (_${_PYTHON_PREFIX}_FIND_DEVELOPMENT_SABIMODULE_ARTIFACTS)
unset (_${_PYTHON_PREFIX}_FIND_DEVELOPMENT_EMBED_ARTIFACTS)
if ("Development.Module" IN_LIST ${_PYTHON_BASE}_FIND_COMPONENTS)
- if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS)$")
+ if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS|Android)$")
list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_MODULE_ARTIFACTS "LIBRARY")
endif()
list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_MODULE_ARTIFACTS "INCLUDE_DIR")
endif()
if ("Development.SABIModule" IN_LIST ${_PYTHON_BASE}_FIND_COMPONENTS)
- if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS)$")
+ if (CMAKE_SYSTEM_NAME MATCHES "^(Windows.*|CYGWIN|MSYS|Android)$")
list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_SABIMODULE_ARTIFACTS "SABI_LIBRARY")
endif()
list (APPEND _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_SABIMODULE_ARTIFACTS "INCLUDE_DIR")
android.test-groups = ["numpy"] | ||
android.xbuild-tools = ["cmake", "ninja"] |
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.
android.test-groups = ["numpy"]
Unfortunately the Chaquopy NumPy wheel won't work with the CPython testbed, as it packages OpenBLAS in a Chaquopy-specific location.
android.xbuild-tools = ["cmake", "ninja"]
xbuild-tools is not implemented on Android: pypa/cibuildwheel#2349 (comment)
@@ -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 comment
The 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.
75a86b8
into
henryiii:henryiii/ci/android
* Android tests working * Clarifications
I get "wheel" missing. Going to see if I can inject it. |
* Android tests working * Clarifications
For context, see:
I'll add some inline notes below.