This repository was archived by the owner on Jul 15, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathbuild.sh
More file actions
44 lines (37 loc) · 1.08 KB
/
Copy pathbuild.sh
File metadata and controls
44 lines (37 loc) · 1.08 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
#!/bin/bash
# Build script for FastSM using PyInstaller.
#
# Works on Linux and macOS. On Linux we prefer python3.13 because that's the
# version wxPython publishes Linux wheels for; fall through to python3 if 3.13
# isn't installed.
set -e
PY=""
for candidate in python3.13 python3.12 python3.11 python3; do
if command -v "$candidate" >/dev/null 2>&1; then
PY="$candidate"
break
fi
done
if [ -z "$PY" ]; then
echo "No Python 3 interpreter found on PATH." >&2
exit 1
fi
echo "========================================"
echo "Building FastSM with PyInstaller ($PY)"
echo "========================================"
echo
if ! "$PY" -c "import PyInstaller" >/dev/null 2>&1; then
echo "PyInstaller is not installed. Installing..."
PIP_ARGS=""
# Linux system pythons are usually PEP 668 managed.
if [ "$(uname -s)" = "Linux" ]; then
PIP_ARGS="--break-system-packages"
fi
if ! "$PY" -m pip install $PIP_ARGS pyinstaller; then
echo "Failed to install PyInstaller" >&2
exit 1
fi
fi
"$PY" build.py
echo
echo "Build complete."