Packaging¶
Packaging into an executable¶
The project takes advantage of PyInstaller to package the application into an executable.
The output binary and all embedded dependencies is located into a subfolder named dist: dist/{operating_system}_QGISDeploymentToolbelt_{version}, where operating system is one of MacOS, Ubuntuor Windows. A file named build_environment_report.txt containing build environment information is generated at the project’s root.
Windows¶
Comply with Windows development requirements before to run following commands in your virtual environment:
# Install packaging dependencies
python -m pip install -U -e .[packaging]
# Generates MS Version Info
python .\builder\version_info_templater.py
# Generates MS Executable
python -O .\builder\pyinstaller_build_windows.py

To run it, double-click on the executable file (*.exe) located into dist folder or run it from your PowerShell terminal.
Ubuntu¶
Comply with Ubuntu development requirements before to run following commands in your virtual environment:
# Install packaging dependencies
python -m pip install -U -e .[packaging]
# Generates binary executable
python -O ./builder/pyinstaller_build_ubuntu.py
# make it runnable
chmod +x dist/QGISDeploymentToolbelt_*
To run it, for example:
./dist/QGISDeploymentToolbelt_0-26-0
Docker¶
Note
Image is meant to be used, not to develop. So, it does not contain side code: docs, tests, etc.
If you need that, edit the .dockerignore file.
Requirements¶
Docker >= 20.10
Build¶
docker build --pull --rm -f "Dockerfile" -t qdt:latest "."
Run within the container¶
Enter into the container and run commands interactively::
> docker run --rm -it qdt:latest
root@55c5de0191ee:/user/app# qdt --version
0.23.1
Run QDT directly from the container:
> docker run --rm qdt:latest qdt --version
0.23.1