add a script for building an executable zip file

see https://docs.python.org/3/library/zipapp.html
master
magical 2024-02-05 20:24:15 -08:00
parent a49f9dde32
commit ed0a382cbe
1 changed files with 22 additions and 0 deletions

22
build.sh 100755
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -eu
mkdir -p myapp
if ! test -d myapp/bps; then
echo "Installing dependencies to ./myapp"
pip install -r requirements.txt --target myapp
rm -rf myapp/bin/ myapp/bps/test/ myapp/{bps,PySimpleGUI}/__pycache__/ myapp/*.dist-info/
fi
echo "Copying source files to ./myapp"
cp Fusion_Graph.py myapp/Fusion_Graph.py
cp Fusion_Items.py myapp/Fusion_Items.py
cp Randomizer.py myapp/Randomizer.py
cp GUI.py myapp/GUI.py
cp MFOR.py myapp/__main__.py
echo "Building MFOR.pyz"
python3 -m zipapp -o MFOR.pyz --python "/usr/bin/env python3" --compress myapp
echo "Done"