A minimal CLI tool for building Blender extensions with Python dependencies using uv for fast, reliable dependency resolution.
- Easy Extension Building - Build Blender extensions with a simple command
- Fast Dependency Resolution - Uses uv.lock for precise, reproducible builds
- Cross-Platform Support - Build for Windows, macOS (Intel & ARM), and Linux
- Platform Configuration - Configure target platforms in pyproject.toml
- Rich CLI Interface - Clean command-line interface with progress indicators
- Smart Cleanup - Automatic removal of temporary files and excluded packages
# Install uv (recommended package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install extbpy
uv add extbpy# Initialize a new project
uv init my-blender-extension
cd my-blender-extension
# Add dependencies
uv add numpy requests
# Generate lock file for reproducible builds
uv lock[project]
name = "my-extension"
dependencies = [
"numpy>=1.20.0",
"requests>=2.25.0",
]
[tool.extbpy]
platforms = ["windows-x64", "macos-arm64", "linux-x64"]# Uses configured platforms from uv.lock
uv run extbpy build
# Or specify platforms manually
uv run extbpy build --platform windows-x64 --platform macos-arm64
# Or build for all supported platforms
uv run extbpy build --platform allConfigure your target platforms in pyproject.toml:
[tool.extbpy]
platforms = ["windows-x64", "linux-x64", "macos-arm64", "macos-x64"]Platform Selection Priority:
- Explicit platforms (
--platform windows-x64) → Uses specified platforms - "all" flag (
--platform all) → Uses configured platforms or all supported - No platforms (
extbpy build) → Uses configured platforms or current platform
Supported Platforms:
windows-x64- Windows 64-bitlinux-x64- Linux 64-bitmacos-arm64- macOS Apple Siliconmacos-x64- macOS Intel
extbpy build [OPTIONS]Build a complete Blender extension with Python dependencies.
Key Options:
-p, --platform- Target platforms (windows-x64, linux-x64, macos-arm64, macos-x64, all)-s, --source-dir- Source directory containing extension files-o, --output-dir- Output directory for built extensions--clean/--no-clean- Clean wheel directory before downloading (default: true)
extbpy download [OPTIONS]Download Python wheels without building the extension.
extbpy infoDisplay project metadata, configured platforms, and dependencies.
extbpy cleanRemove temporary files like .blend1 and .MNSession files.
extbpy uses uv for fast, reliable dependency resolution:
- Lock File Based - Reads from
uv.lockfor exact dependency versions - Cross-Platform Wheels - Downloads platform-specific wheels from the lock file
- Reproducible Builds - Same lock file produces identical builds across environments
- Fast Resolution - Leverages uv's speed for dependency resolution
my-blender-extension/
├── pyproject.toml # Python project configuration
├── uv.lock # Locked dependencies (generated by uv)
├── my-extension/ # Extension directory
│ ├── blender_manifest.toml # Blender extension manifest
│ ├── __init__.py # Extension code
│ └── wheels/ # Downloaded wheels (auto-generated)
└── README.md
# Build using configured platforms
uv run extbpy build
# Build for specific platforms
uv run extbpy build -p windows-x64 -p macos-arm64
# Build for all supported platforms
uv run extbpy build -p all
# Download wheels only
uv run extbpy download -p linux-x64
# Show project info
uv run extbpy info
# Clean temporary files
uv run extbpy cleanMIT License - see the LICENSE file for details.