Skip to main content

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:

  1. Explicit platforms (--platform windows-x64) → Uses specified platforms
  2. "all" flag (--platform all) → Uses configured platforms or all supported
  3. No platforms (extbpy build) → Uses configured platforms or current platform

Supported Platforms:

  • windows-x64 - Windows 64-bit
  • linux-x64 - Linux 64-bit
  • macos-arm64 - macOS Apple Silicon
  • macos-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:

  1. Lock File Based - Reads from uv.lock for exact dependency versions
  2. Cross-Platform Wheels - Downloads platform-specific wheels from the lock file
  3. Reproducible Builds - Same lock file produces identical builds across environments
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extbpy-0.2.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extbpy-0.2.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

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

Hashes for extbpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 153f3b11a246c36e4a80ec2e48b432d3e45f9fd257122e767997772e11504067
MD5 26ff3f2b7613974852fd310c1c6baf83
BLAKE2b-256 8596c68338bc8509c748e4fefd5f01bde2b8aeda2364af3d505ac8a040436536

See more details on using hashes here.

Provenance

The following attestation bundles were made for extbpy-0.2.0.tar.gz:

Publisher: pypi.yml on BradyAJohnston/extbpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for extbpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05a732da02166136e5fd9994b9b1830acbebf2c05223d97c62d04a4f6bca38d8
MD5 c199888e6d364aaea87a87bd0ee24deb
BLAKE2b-256 a390b55d4baa6f1266493fcd2125eb2ae84f4b363ffd7986ad962294b8a4b721

See more details on using hashes here.

Provenance

The following attestation bundles were made for extbpy-0.2.0-py3-none-any.whl:

Publisher: pypi.yml on BradyAJohnston/extbpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page