Develop on Windows

Commands tested on:

  • Windows 11 Professional

Requirements

Enable remote scripts (for virtual environment)

Open a Powershell prompt as administrator inside the repository folder:

# if not already done, enable scripts - required by virtualenv
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Installation steps

Clone the repository

Clone the repository where you want using GitHub Desktop as graphical interface or a PowerShell terminal:

git clone https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli.git
# or using ssh
git clone git@github.com:qgis-deployment/qgis-deployment-toolbelt-cli.git

Set up the virtual environment

# create a virtual env
py -3 -m venv .venv

# enable virtual env
.\.venv\Scripts\activate

# upgrade basic tooling
python -m pip install -U pip setuptools wheel

# dulwich without binary extensions, like official executables
$env:PIP_NO_BINARY = "dulwich"; $env:PURE = "1"
python -m pip install -U -e .[dev]

Note

As in CI and official executables, dulwich is installed without its Rust extensions: PIP_NO_BINARY makes pip build it from source, PURE skips the extensions.

Install git hooks

pre-commit install

Try it

qgis-deployment-toolbelt --help

Happy coding!