A powerful CLI tool for building Blender extensions with Python dependencies
Project description
extbpy
A minimal CLI tool for building Blender extensions with Python dependencies using uv for fast, reliable dependency resolution.
Features
- 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
Installation
# Install uv (recommended package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install extbpy
uv add extbpy
Quick Start
1. Set up your project with uv:
# 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
2. Configure platforms in your pyproject.toml:
[project]
name = "my-extension"
dependencies = [
"numpy>=1.20.0",
"requests>=2.25.0",
]
[tool.extbpy]
platforms = ["windows-x64", "macos-arm64", "linux-x64"]
3. Build your extension:
# 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 all
Platform Configuration
Configure 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
Commands
build - Build Extension
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)
download - Download Wheels Only
extbpy download [OPTIONS]
Download Python wheels without building the extension.
info - Project Information
extbpy info
Display project metadata, configured platforms, and dependencies.
clean - Clean Temporary Files
extbpy clean
Remove temporary files like .blend1 and .MNSession files.
How it Works
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
Project Structure
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
Examples
# 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 clean
License
MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file extbpy-0.2.0.tar.gz.
File metadata
- Download URL: extbpy-0.2.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
153f3b11a246c36e4a80ec2e48b432d3e45f9fd257122e767997772e11504067
|
|
| MD5 |
26ff3f2b7613974852fd310c1c6baf83
|
|
| BLAKE2b-256 |
8596c68338bc8509c748e4fefd5f01bde2b8aeda2364af3d505ac8a040436536
|
Provenance
The following attestation bundles were made for extbpy-0.2.0.tar.gz:
Publisher:
pypi.yml on BradyAJohnston/extbpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extbpy-0.2.0.tar.gz -
Subject digest:
153f3b11a246c36e4a80ec2e48b432d3e45f9fd257122e767997772e11504067 - Sigstore transparency entry: 831161848
- Sigstore integration time:
-
Permalink:
BradyAJohnston/extbpy@1f3fc101d313238d049a23a259101c3e4c840a6f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/BradyAJohnston
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@1f3fc101d313238d049a23a259101c3e4c840a6f -
Trigger Event:
push
-
Statement type:
File details
Details for the file extbpy-0.2.0-py3-none-any.whl.
File metadata
- Download URL: extbpy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05a732da02166136e5fd9994b9b1830acbebf2c05223d97c62d04a4f6bca38d8
|
|
| MD5 |
c199888e6d364aaea87a87bd0ee24deb
|
|
| BLAKE2b-256 |
a390b55d4baa6f1266493fcd2125eb2ae84f4b363ffd7986ad962294b8a4b721
|
Provenance
The following attestation bundles were made for extbpy-0.2.0-py3-none-any.whl:
Publisher:
pypi.yml on BradyAJohnston/extbpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extbpy-0.2.0-py3-none-any.whl -
Subject digest:
05a732da02166136e5fd9994b9b1830acbebf2c05223d97c62d04a4f6bca38d8 - Sigstore transparency entry: 831161856
- Sigstore integration time:
-
Permalink:
BradyAJohnston/extbpy@1f3fc101d313238d049a23a259101c3e4c840a6f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/BradyAJohnston
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@1f3fc101d313238d049a23a259101c3e4c840a6f -
Trigger Event:
push
-
Statement type: