diff --git a/README.md b/README.md index 20ea7c7..0f315d5 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,14 @@ Replace `wget` with the dependencies / package(s) you need to install. will generate a `spec` file for `your-script.py` in your current working directory. See the PyInstaller docs for more information. +##### How do I specify one of many preexisting .spec files? + +If you have multiple `spec` files in your source directory, you might want to specify which one to use. + +`docker run -v "$(pwd):/src/" cdrx/pyinstaller-linux "pyinstaller --clean -y --dist ./dist/linux --workpath /tmp your-spec.spec && chown -R --reference=. ./dist/linux"` + +will generate a binary for `your-spec.spec` only. + ##### How do I change the PyInstaller version used? Add `pyinstaller=3.1.1` to your `requirements.txt`. diff --git a/entrypoint-linux.sh b/entrypoint-linux.sh old mode 100644 new mode 100755 index 5eac72d..16c2f24 --- a/entrypoint-linux.sh +++ b/entrypoint-linux.sh @@ -38,7 +38,11 @@ fi # [ -f requirements.txt ] echo "$@" if [[ "$@" == "" ]]; then - pyinstaller --clean -y --dist ./dist/linux --workpath /tmp *.spec + SPECS=($(ls *.spec)) + for NEXT in ${SPECS[@]}; do + echo "Located pyinstaller spec file: $NEXT" + pyinstaller --clean -y --dist ./dist/linux --workpath /tmp $NEXT + done chown -R --reference=. ./dist/linux else sh -c "$@" diff --git a/entrypoint-windows.sh b/entrypoint-windows.sh index c828d50..6fc6de7 100755 --- a/entrypoint-windows.sh +++ b/entrypoint-windows.sh @@ -38,7 +38,11 @@ fi # [ -f requirements.txt ] echo "$@" if [[ "$@" == "" ]]; then - pyinstaller --clean -y --dist ./dist/windows --workpath /tmp *.spec + SPECS=($(ls *.spec)) + for NEXT in ${SPECS[@]}; do + echo "Located pyinstaller spec file: $NEXT" + pyinstaller --clean -y --dist ./dist/windows --workpath /tmp $NEXT + done chown -R --reference=. ./dist/windows else sh -c "$@"