Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-package/packager/nativelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

def _lib_name() -> str:
"""Return platform dependent shared object name."""
if system() in ["Linux", "OS400"] or system().upper().endswith("BSD"):
if system() in ["Linux", "Android", "OS400"] or system().upper().endswith("BSD"):
name = "libxgboost.so"
elif system() == "Darwin":
name = "libxgboost.dylib"
Expand Down
4 changes: 4 additions & 0 deletions python-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ pyspark = ["pyspark", "scikit-learn", "cloudpickle"]

[tool.hatch.build.targets.wheel.hooks.custom]

[tool.cibuildwheel.android.environment]
# Required for pthread_getname_np
ANDROID_API_LEVEL = "26"

[tool.isort]
profile = "black"

Expand Down
2 changes: 1 addition & 1 deletion python-package/xgboost/libpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def find_lib_path() -> List[str]:
]
)
dll_path = [os.path.join(p, "xgboost.dll") for p in dll_path]
elif sys.platform.startswith(("linux", "freebsd", "emscripten")):
elif sys.platform.startswith(("linux", "android", "freebsd", "emscripten")):
dll_path = [os.path.join(p, "libxgboost.so") for p in dll_path]
elif sys.platform == "darwin":
dll_path = [os.path.join(p, "libxgboost.dylib") for p in dll_path]
Expand Down
2 changes: 1 addition & 1 deletion python-package/xgboost/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
def has_ipv6() -> bool:
"""Check whether IPv6 is enabled on this host."""
# connection error in macos, still need some fixes.
if system() not in ("Linux", "Windows"):
if system() not in ("Linux", "Android", "Windows"):
return False

if socket.has_ipv6:
Expand Down
Loading