Skip to content
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

Enabled android-ndk to work with Python 3.12+ #809

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions kiwixbuild/dependencies/tc_android_ndk.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class Source(ReleaseDownload):
def source_dir(self):
return self.target.full_name()

patches = [
"android-ndk-r21e-linux-x86_64-python3.12+.patch",
]

class Builder(Builder):
@property
def install_path(self):
Expand Down
26 changes: 26 additions & 0 deletions kiwixbuild/patches/android-ndk-r21e-linux-x86_64-python3.12+.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--- android-ndk-r21e/build/tools/make_standalone_toolchain.py.orig 2025-03-04 20:48:14.681288830 +0400
+++ android-ndk-r21e/build/tools/make_standalone_toolchain.py 2025-03-05 12:10:47.252578915 +0400
@@ -21,7 +21,6 @@
"""
import argparse
import atexit
-from distutils.dir_util import copy_tree
import inspect
import logging
import os
@@ -221,13 +220,13 @@

def create_toolchain(install_path, arch, api, toolchain_path, host_tag):
"""Create a standalone toolchain."""
- copy_tree(toolchain_path, install_path)
+ shutil.copytree(toolchain_path, install_path)
triple = get_triple(arch)
make_clang_scripts(install_path, arch, api, host_tag == 'windows-x86_64')
replace_gcc_wrappers(install_path, triple, host_tag == 'windows-x86_64')

prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
- copy_tree(prebuilt_path, install_path)
+ shutil.copytree(prebuilt_path, install_path, dirs_exist_ok=True)

gdbserver_path = os.path.join(
NDK_DIR, 'prebuilt', 'android-' + arch, 'gdbserver')
Loading