Aims to compile python applications cross platform, requires docker and docker-compose to be installed. Get Docker on their official website.
Inspired by cdrx/pyinstaller-windows
Compiles Python 3.9.9
for Unix and Windows with PyInstaller
In your project which you would like to compile, create a docker-compose.yml
file.
An example could be something like:
version: "3.9"
services:
windows:
image: annihilator708/compile-juggernaut-windows:latest
volumes:
- ".:/src/"
environment:
- SPEC_FILENAME=main.spec
unix:
image: annihilator708/compile-juggernaut-unix:latest
volumes:
- ".:/src/"
environment:
- SPEC_FILENAME=main.spec
Note: It's very important to volume mount your project into the /src/
folder
SPEC_FILENAME: Can be generated with pyi-makespec
and has different output depending on your project, for more info see the docs for pyi-makespec
Tip: When generating your spec file, add the option --add-data /src/*;./*
to add your source code.
With the docker-compose.yml
file, use docker-compose up --build
to start building!
Two folders are generated when compiling.
build
-> Contains files needed when compilingdist
-> Contains the final product
The project which is volume mounted can contain two requirements.txt
files.
requirements.txt
-> Contains pip freeze requirements of your applicationbuild_requirements.txt
-> Contains pip libraries which are required to compile the application
- github -> source code
- dockerhub -> compile-juggernaut-unix
- dockerhub -> compile-juggernaut-windows