Skip to content

Development Setup

Requirements

  • Python >=3.10, <3.14

Note

All actions should be performed under repository root folder i.e. ./Blender-Launcher-V2

Project Manager

It’s recommended to use UV as the project manager.

Setting Up Development Environment

Install virtualenv:

python -m pip install virtualenv

Create the virtual environment:

python -m virtualenv --clear --download .venv

Activate the virtual environment:

./.venv/Scripts/activate.ps1
./.venv/Scripts/activate
source .venv/bin/activate

Minimum set of packages for building executable:

pip install -e .

All packages including development tools:

pip install -e ".[docs,ruff,pytest]"

Install dependencies:

pdm install

Install with all development groups:

pdm install --dev

Activate the virtual environment:

./.venv/Scripts/activate.ps1
./.venv/Scripts/activate
source .venv/bin/activate

Or run commands directly with PDM:

pdm run python source/main.py

Create the virtual environment:

uv venv

Install dependencies:

uv sync

Install with all extras:

uv sync --extra docs --extra ruff --extra pytest

Activate the virtual environment:

./.venv/Scripts/activate.ps1
./.venv/Scripts/activate
source .venv/bin/activate

Or run commands directly with UV:

uv run source/main.py

Running Blender Launcher

Info

As of (c90f33d), cached Blender-Launcher-V2 files (such as resources_rc.py and global.qss) are no longer included in the source due to them artificially inflating git diffs. In order to generate them, run the build_style.py script located in the root project directory. Running Blender Launcher without these being built will result in an error.

Build required resources

Generate the cached resource files:

python build_style.py

This creates necessary files like resources_rc.py and global.qss that are required to run the application.

Run the application

python source/main.py
pdm run bl
uv run source/main.py

Building Blender Launcher Executable

Warning

Executables made in PyInstaller must be built inside the target platform! You cannot build for a different platform other than your own.

Build the executable

Run the build script:

./scripts/build_win.bat
./scripts/build_linux.sh
./scripts/build_mac.sh

This creates a standalone executable using PyInstaller.

Locate the output:

Look for bundled app under the Blender-Launcher-V2/dist/release folder.

Documentation

Preview the Documentation

Start the local documentation server:

./scripts/mkdocs_serve.bat
./scripts/mkdocs_serve.sh

Then open http://127.0.0.1:8000/ in a web browser.

Update the Documentation

Note

You should never edit the documentation in the gh-pages branch; this branch is used to publish the documentation.

Edit documentation files:

Make the desired modifications in the .md files under the docs/mkdocs directory.

Publish the Documentation

Warning

These scripts will only work if you have write access to the Blender-Launcher-V2 repo.

Deploy to GitHub Pages:

./scripts/mkdocs_publish.bat
./scripts/mkdocs_publish.sh

This builds and publishes the documentation to the gh-pages branch.

Common Development Tasks

Running Tests

pytest
pdm run pytest
uv run pytest

Code Formatting and Linting

Check code with Ruff:

ruff check .

Format code with Ruff:

ruff format .

Updating Dependencies

pip install --upgrade -e ".[docs,ruff,pytest]"
pdm update
uv sync --upgrade