Skip to content

Commit

Permalink
Support Python 3.12+
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu authored and 1q23lyc45 committed Dec 28, 2024
1 parent 4220fd6 commit 7b9f4a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,10 @@ def setup_ndk(args):
rm_rf(ondk_path)
with urllib.request.urlopen(url) as response:
with tarfile.open(mode="r|xz", fileobj=response) as tar:
tar.extractall(ndk_root)
if hasattr(tarfile, "data_filter"):
tar.extractall(ndk_root, filter="tar")
else:
tar.extractall(ndk_root)

rm_rf(ndk_path)
mv(ondk_path, ndk_path)
Expand Down

0 comments on commit 7b9f4a1

Please sign in to comment.