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.1.0.tar.gz (14.2 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.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file extbpy-0.1.0.tar.gz.

File metadata

  • Download URL: extbpy-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extbpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 394b7050f5b59ccfa33ede08b45090954360f9bb35c5b503233888af5a4d7019
MD5 d5012ae5166a2cdae61a675635970d32
BLAKE2b-256 87bb80f21e583a70d8025d26f87317140e2ed6ca79441ed85c1ac418d1f5be53

See more details on using hashes here.

Provenance

The following attestation bundles were made for extbpy-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: extbpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13a9327a2d022d96c89b06d354463c556707c8780f7289dc227f6ae34d15573c
MD5 0b938397616276b5e8452609238867fe
BLAKE2b-256 0ebb4064a711eab5e98d420cfad19050dac80c1ab6267a812c3f7b71578c6015

See more details on using hashes here.

Provenance

The following attestation bundles were made for extbpy-0.1.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