Skip to content

Commit c012526

Browse files
install build tools on linux/macos
1 parent 2729b4a commit c012526

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/build-wheels.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ jobs:
2323

2424
- name: Install build tools (Linux only)
2525
if: runner.os == 'Linux'
26-
run: sudo apt-get update && sudo apt-get install -y build-essential cmake
26+
run: sudo apt-get update && sudo apt-get install -y build-essential cmake pkg-config ninja nasm
27+
28+
- name: Install build tools (macOS only)
29+
if: runner.os == 'macOS'
30+
run: brew install cmake pkg-config nasm ninja
2731

2832
- name: Install build dependencies
2933
run: |

scripts/download_sdl.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,19 @@ def extract_zip(zip_path, dest_dir):
4545
os.makedirs(os.path.dirname(target_path), exist_ok=True)
4646
with open(target_path, "wb") as f:
4747
f.write(zip_ref.read(member))
48-
print(f"Extracted {zip_path} to {dest_dir}")
48+
extracted_dir = os.path.join(dest_dir, top_level)
49+
if os.path.isdir(extracted_dir):
50+
for item in os.listdir(extracted_dir):
51+
src = os.path.join(extracted_dir, item)
52+
dst = os.path.join(dest_dir, item)
53+
if os.path.exists(dst):
54+
if os.path.isdir(dst):
55+
shutil.rmtree(dst)
56+
else:
57+
os.remove(dst)
58+
shutil.move(src, dst)
59+
shutil.rmtree(extracted_dir)
60+
print(f"Extracted and flattened {zip_path} to {dest_dir}")
4961

5062
def extract_tar(tar_path, dest_dir):
5163
with tarfile.open(tar_path, "r:gz") as tar_ref:

0 commit comments

Comments
 (0)