44 lines
839 B
Bash
Executable File
44 lines
839 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
export HOME="${HOME:-/tmp}"
|
|
export PYINSTALLER_CONFIG_DIR="${PYINSTALLER_CONFIG_DIR:-/tmp/pyinstaller-cache}"
|
|
|
|
cd /src
|
|
|
|
echo "==> Python"
|
|
python --version
|
|
echo
|
|
|
|
echo "==> Cleaning previous artifacts"
|
|
rm -rf build dist
|
|
mkdir -p dist
|
|
echo
|
|
|
|
echo "==> Building cellar-cli"
|
|
python -m PyInstaller cellar-cli.spec --clean --noconfirm
|
|
echo
|
|
|
|
echo "==> Building cellar GTK"
|
|
python -m PyInstaller cellar.spec --clean --noconfirm
|
|
echo
|
|
|
|
echo "==> Built files"
|
|
ls -lh dist
|
|
echo
|
|
|
|
show_glibc_requirement() {
|
|
local binary="$1"
|
|
echo "-- $(basename "$binary")"
|
|
objdump -p "$binary" 2>/dev/null \
|
|
| grep -oE 'GLIBC_[0-9]+\.[0-9]+' \
|
|
| sort -Vu \
|
|
| tail -1
|
|
}
|
|
|
|
echo "==> GLIBC requirements"
|
|
show_glibc_requirement dist/cellar-cli
|
|
show_glibc_requirement dist/cellar
|
|
echo
|
|
|
|
echo "==> Done" |