Platform specific (multi-OS) extensions and wheels #74
Labels
No Label
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Type
Breaking
Type
Bug
Type
Documentation
Type
Enhancement
Type
Feature
Type
Security
Type
Testing
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/extensions-website#74
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Multi-OS (add-ons) extensions
Guiding principles:
They are two main reasons an extension may be OS specific:
In both cases this is indicated by the new
plaforms
manifest field.Manifest:
windows-amd64
,windows-arm64
,macos-x86_64
,macos-arm64
,linux-x86_64
Extensions package
To reduce the bandwith required to download extensions, the server can generate multiple platform-specific package from one uploaded package. The uploaded package is always a single .zip package containing the dependencies of all supported platforms. The server will then split the uploaded package into platform specific packages, with only the dependencies relevant to that platform.
Uploaded package:
Server-generated windows-amd64 package:
Server-generated macos-x86_64 package:
Tasks:
I think it is beneficial to adopt the notation defined in https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#platform-tag (takes over from https://peps.python.org/pep-0425/#platform-tag and uses the same rules): using underscores in the platform tag.
Unfortunately the docs don't provide a comprehensive list of platform tags and the spec document is not comprehensive enough, but we can also look at the popular wheel distributions compliant with the spec, e.g. https://pypi.org/project/Cython/#files and https://pypi.org/project/numpy/#files
We can also consult with packaging tests: https://github.com/pypa/packaging/blob/main/tests/test_tags.py
The windows tags then become:
win_amd64
,win_arm64
(couldn't easily find those in the wild and don't see blender releases available for windows arm)Linux: the spec differentiates between manylinux and musllinux, making
linux_x86_64
insufficient for a general case, but later in the same doc useslinux_x86_64
in examples. Not sure if we need to differentiate here, this also depends on how blender will be selecting wheels during installation. See also https://peps.python.org/pep-0600/MacOS: is also not uniform, you can find
macosx_11_0_arm64
andmacosx_10_9_x86_64
(and other ones, see the test)We have a choice to ignore the packaging spec for the
platforms
field and use whatever blender can produce as its platform tag, but I think that having consistency across our platform tags and wheel names is important - it leaves less room for surprises, when a wrong wheel may be picked during installation; and I would expect that wheels will be built by standard tooling, leading to the names complying with the spec.I updated the schema on the documentation already to include the
platforms
field: