Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
6 changes: 5 additions & 1 deletion entrypoint-linux.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down
6 changes: 5 additions & 1 deletion entrypoint-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down