A tool to use a `pyproject.toml` instead of a `blender_manifest.toml` to build Blender add-ons
Project description
Peeler
Use a
pyproject.tomlfile instead (or alongside) of theblender_manifest.tomlrequired for building blender add-ons since Blender 4.2 .
Easily package a blender add-on without having to manually download dependencies
wheels(and dependencies of dependencies !) and manually write theirs paths toblender_manifest.toml.
Installation
uv is needed to use the Wheels feature
If you don't have uv installed
Either install uv and run:
pip install peeler
Or install uv and peeler at once:
pip install peeler[uv]
If you're already a uv user
Peeler doesn't need to be added in your project dependencies, meaning you can use directly peeler as a tool:
uvx peeler [OPTIONS] COMMAND [ARGS]
Or install peeler without uv:
pip install peeler
Features
Manifest
Create a blender_manifest.toml from fields in a pyproject.toml
- Make sure to have a
pyproject.tomlwith basic field values:
# pyproject.toml
[project]
name = "My Awesome Addon"
version = "1.0.0"
- Some meta-data are specific to Blender, such as
blender_version_min, you can specify theses in yourpyproject.tomlfile under the[tool.peeler.manifest]table, here's a minimalpyproject.tomlworking version:
# pyproject.toml
[project]
name = "My Awesome Addon"
version = "1.0.0"
[tool.peeler.manifest]
blender_version_min = "4.2.0"
id = "my_awesome_addon"
license = ["SPDX:0BSD"]
maintainer = "John Smith"
tagline = "My Add-on is awesome"
- Run peeler to create (or update)
blender_manifest.toml:
peeler manifest /path/to/your/pyproject.toml /path/to/blender_manifest.toml
# created blender_manifest.toml
version = "1.0.0"
name = "My Awesome Addon"
schema_version = "1.0.0"
type = "add-on"
blender_version_min = "4.2.0"
id = "my_awesome_addon"
license = ["SPDX:0BSD"]
maintainer = "John Smith"
tagline = "My Add-on is awesome"
The manifest is filled with values from the pyproject [project], [tool.peeler.manifest] tables and default values.
To get a full list of values required or optional in a blender_manifest.toml visit https://docs.blender.org/manual/en/latest/advanced/extensions/getting_started.html#manifest
Wheels
Download the wheels needed to package your add-on using dependencies specified in your pyproject.toml, and write their paths to blender_manifest.toml
- In your
pyproject.tomlspecify your dependencies:
# pyproject.toml
[project]
name = "My Awesome Addon"
version = "1.0.0"
requires-python = "==3.11"
# For instance rich and Pillow (the popular image manipulation module)
dependencies = [
"Pillow==11.1.0",
"rich>=13.9.4",
]
- Run peeler to downloads the wheels for all platforms:
peeler wheels ./pyproject.toml ./blender_manifest.toml
Your blender_manifest.toml will be updated with the downloaded wheels paths
# updated blender_manifest.toml
version = "1.0.0"
name = "My Awesome Addon"
schema_version = "1.0.0"
type = "add-on"
blender_version_min = "4.2.0"
# the wheels as a list of paths
wheels = [
# pillow wheels for all platforms
"./wheels/pillow-11.1.0-cp311-cp311-macosx_10_10_x86_64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-manylinux_2_28_aarch64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-manylinux_2_28_x86_64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-musllinux_1_2_aarch64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-musllinux_1_2_x86_64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-win32.whl",
"./wheels/pillow-11.1.0-cp311-cp311-win_amd64.whl",
"./wheels/pillow-11.1.0-cp311-cp311-win_arm64.whl",
# wheels for rich and its dependencies
"./wheels/rich-13.9.4-py3-none-any.whl",
"./wheels/markdown_it_py-3.0.0-py3-none-any.whl",
"./wheels/mdurl-0.1.2-py3-none-any.whl",
"./wheels/pygments-2.18.0-py3-none-any.whl"
]
Note that the dependencies of the dependencies of the specified in pyproject.toml are also downloaded, neat !
# pillow and rich dependency tree resolved from
# dependencies = [
# "Pillow==11.1.0",
# "rich>=13.9.4",
# ]
My Awesome Addon v1.0.0
├── pillow v11.1.0
├── rich v13.9.4
│ ├── markdown-it-py v3.0.0
│ │ └── mdurl v0.1.2
│ └── pygments v2.18.0
Authors
- Maxime Letellier - Initial work
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 peeler-0.2.1.tar.gz.
File metadata
- Download URL: peeler-0.2.1.tar.gz
- Upload date:
- Size: 50.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17bdf3a3fb9ba91005233ee8a4a0d030903e3b372b9f16f6b3e948da389cfb4e
|
|
| MD5 |
c42288162c3bfe0e65dfd20944209861
|
|
| BLAKE2b-256 |
49cf2ce2e926617face627098ce1cffbc72895e997682750f09e560c8fbc20dd
|
Provenance
The following attestation bundles were made for peeler-0.2.1.tar.gz:
Publisher:
release.yaml on Maxioum/Peeler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peeler-0.2.1.tar.gz -
Subject digest:
17bdf3a3fb9ba91005233ee8a4a0d030903e3b372b9f16f6b3e948da389cfb4e - Sigstore transparency entry: 170648291
- Sigstore integration time:
-
Permalink:
Maxioum/Peeler@ecda10d27ee537766f3f76ec0376c0e82c6c2148 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/Maxioum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@ecda10d27ee537766f3f76ec0376c0e82c6c2148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file peeler-0.2.1-py3-none-any.whl.
File metadata
- Download URL: peeler-0.2.1-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c5c71a370a5bf280fb6cee1623a0acbe1a949d3c0792fa999ed04fa1cdf995
|
|
| MD5 |
6ed11b965fe01b486880573dbb37b128
|
|
| BLAKE2b-256 |
977d6944289fac8d2ffbdf776ed284facfc51777672d31c965add0ddef593a5a
|
Provenance
The following attestation bundles were made for peeler-0.2.1-py3-none-any.whl:
Publisher:
release.yaml on Maxioum/Peeler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peeler-0.2.1-py3-none-any.whl -
Subject digest:
f0c5c71a370a5bf280fb6cee1623a0acbe1a949d3c0792fa999ed04fa1cdf995 - Sigstore transparency entry: 170648294
- Sigstore integration time:
-
Permalink:
Maxioum/Peeler@ecda10d27ee537766f3f76ec0376c0e82c6c2148 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/Maxioum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@ecda10d27ee537766f3f76ec0376c0e82c6c2148 -
Trigger Event:
push
-
Statement type: