docker-pyinstaller icon indicating copy to clipboard operation
docker-pyinstaller copied to clipboard

Multiple .spec files

Open justinmoon opened this issue 6 years ago • 3 comments
trafficstars

My project has multiple .spec files. Is there an easy way to specify which one you want docker-pyinstaller to use?

justinmoon avatar Sep 07 '19 21:09 justinmoon

You can specify the spec file to build by running it like:

pyinstaller --clean -y --dist ./dist/linux --workpath /tmp name-of-file.spec

cdrx avatar Jan 14 '20 14:01 cdrx

I would gladly merge a PR allowing the entry point to choose which spec file to build (rather than *.spec)

cdrx avatar Jan 14 '20 14:01 cdrx

Actually, the current logic of entrypoint-*.sh as it is, allows specifying a spec file, see e.g. line 43 in the linux version. To use it, one needs to run docker with e.g. (clearly .spec needs to be replaced with the file of your choice):

docker run -v "$(pwd):/src/" cdrx/pyinstaller-linux "pyinstaller --clean -y --dist ./dist/linux --workpath /tmp <selected>.spec && chown -R --reference=. ./dist/linux"

This does exactly the same as the default behaviour, except for trying to look for *.spec.

For windows I was also able to build the files for windows by replacing the three references to "linux" in the command with "windows".

mapto avatar Jul 22 '21 15:07 mapto