Metadata-Version: 2.4
Name: beb
Version: 0.2.0
Summary: Build Blender extension archives from JSON or YAML manifests
Home-page: https://github.com/minimalefforttech/beb
Author: Alex Telford
License: MIT
Project-URL: Repository, https://github.com/minimalefforttech/beb
Project-URL: Issues, https://github.com/minimalefforttech/beb/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Markdown>=3.6
Requires-Dist: PyYAML>=6.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<!-- Copyright 2026 Alex Telford, Minimal Effort Tech. -->

# Blender Extension Builder

Blender Extension Builder packages Blender extensions from a repository manifest.

Source repository: https://github.com/minimalefforttech/beb

## What It Does

- Builds Blender extension zip archives from `manifest.json`, `manifest.yaml`, or `manifest.yml`
- Downloads and caches dependency wheels per target platform
- Embeds explicit custom wheels from disk, glob patterns, or local builds
- Generates HTML docs from Markdown when `Markdown` is available
- Creates deploy bundles containing extension archives, docs output, and install notes
- Exposes the workflow through both the `beb` CLI and the Python API

## Installation

```bash
pip install beb
```

The published package name is `beb`, and the top-level import package is also `beb`.

`PyYAML` and `Markdown` are standard dependencies, but the builder still handles JSON-only or non-docs workflows when those optional features are unavailable at runtime.

## CLI Workflow

```bash
beb validate
beb build
beb install
beb deploy
```

- `beb build` creates a single extension archive.
- `beb install` builds the archive and installs it into a Blender instance.
- `beb deploy` builds the configured deploy variants and assembles a distributable bundle.

## Manifest Highlights

Core sections:

- `id`, `version`, `name`, `blender_version_min`: extension metadata
- `paths.include`, `paths.exclude`: file selection for the package
- `requires`: dependency wheels resolved from pip
- `embedded_wheels`: explicit wheels to include from disk or local builds
- `docs`: Markdown-to-HTML build settings
- `deploy`: deploy variants and install instructions

## Deploy Variants

Each `deploy.variants[]` entry can adjust build-shaping fields without redefining the whole manifest.

Supported variant fields:

- `suffix`
- `description`
- `platforms`
- `blender_version_min`
- `blender_version_max`
- `paths.include`
- `paths.exclude`
- `requires`
- `wheels`
- `docs`

Variant behavior:

- `paths.include` and `paths.exclude` are additive. Variant patterns are appended after the base manifest patterns.
- `requires` updates the base requirement list by package name.
- Prefix a requirement with `!` to remove that base package for the variant, for example `!pillow`.
- A non-`!` requirement replaces any base requirement with the same package name and then adds the new entry.
- `wheels: false` skips pip-resolved wheels from `requires`, but explicit `embedded_wheels` are still included.
- `docs: true` embeds generated HTML docs into that variant archive at `docs.output_dir`.

If a variant uses `platforms: ["all"]`, the generated `blender_manifest.toml` omits the `platforms` field instead of writing `platforms = ["all"]`.

## Docs Output

When `docs.enabled` is true, docs can be emitted in two ways:

- Set `deploy.variants[].docs` to `true` to embed generated HTML in that variant archive.
- Leave `docs` unset or `false` for all variants to generate one separate documentation folder in the deploy bundle.

## Python API

```python
from beb import build_extension, build_deploy_bundle, load_manifest

result = build_extension("manifest.json")
archives = build_deploy_bundle("manifest.json").archive_paths
manifest = load_manifest("manifest.json")
```

## Repository Layout

- `beb`: importable package
- `cli`: repository helper entry points
- `examples`: sample manifests for common workflows
- `docs`: user and developer guides
- `tests`: automated coverage for manifests, wheels, builder behavior, and docs

## Documentation

- User guide: `docs/user_guide.md`
- Developer guide: `docs/developer_guide.md`

## Releases

GitHub Actions builds wheels and source distributions on pushes and publishes tagged releases to PyPI.

## License

This project is licensed under the MIT License. See `LICENSE`.
