mirror of
https://github.com/topjohnwu/Magisk
synced 2025-09-02 15:55:15 +00:00
Support Python 3.12+
This commit is contained in:
3
build.py
3
build.py
@@ -536,6 +536,9 @@ def setup_ndk(args):
|
|||||||
rm_rf(ondk_path)
|
rm_rf(ondk_path)
|
||||||
with urllib.request.urlopen(url) as response:
|
with urllib.request.urlopen(url) as response:
|
||||||
with tarfile.open(mode="r|xz", fileobj=response) as tar:
|
with tarfile.open(mode="r|xz", fileobj=response) as tar:
|
||||||
|
if hasattr(tarfile, "data_filter"):
|
||||||
|
tar.extractall(ndk_root, filter="tar")
|
||||||
|
else:
|
||||||
tar.extractall(ndk_root)
|
tar.extractall(ndk_root)
|
||||||
|
|
||||||
rm_rf(ndk_path)
|
rm_rf(ndk_path)
|
||||||
|
Reference in New Issue
Block a user