-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild_wheels.sh
More file actions
executable file
·51 lines (39 loc) · 1.27 KB
/
Copy pathbuild_wheels.sh
File metadata and controls
executable file
·51 lines (39 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# build_wheels.sh - Build anki-audio wheels for all platforms
# Uses environment variables to control target platform
#
# You can also build individual wheels manually:
# ANKI_AUDIO_TARGET_OS=darwin ANKI_AUDIO_TARGET_ARCH=arm64 uv build
# ANKI_AUDIO_TARGET_OS=darwin ANKI_AUDIO_TARGET_ARCH=x86_64 uv build
# ANKI_AUDIO_TARGET_OS=windows ANKI_AUDIO_TARGET_ARCH=amd64 uv build
set -e
echo "Building anki-audio wheels for all platforms..."
# Clean up any existing builds
rm -rf dist/ anki_audio/
mkdir -p anki_audio
touch anki_audio/__init__.py
# Function to build wheel for specific platform
build_wheel() {
local os=$1
local arch=$2
local description=$3
echo "Building $description wheel..."
# Clean for build
rm -rf anki_audio/
mkdir -p anki_audio
touch anki_audio/__init__.py
# Set environment variables and build
ANKI_AUDIO_TARGET_OS="$os" ANKI_AUDIO_TARGET_ARCH="$arch" uv build --wheel
echo "Built $description wheel"
rm -rf anki_audio/
}
# Build all platforms
build_wheel "darwin" "arm64" "macOS ARM64"
build_wheel "darwin" "x86_64" "macOS x86_64"
build_wheel "windows" "amd64" "Windows"
echo ""
echo "All wheels built successfully:"
ls -la dist/*.whl
echo ""
echo "Wheel sizes:"
du -h dist/*.whl