add a script for building an executable zip file
see https://docs.python.org/3/library/zipapp.htmlmaster
parent
a49f9dde32
commit
ed0a382cbe
|
@ -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"
|
Loading…
Reference in New Issue