Return to Level1Techs.com

[Devember 2021] Blender bpy module CI build automation

Summary


Problem:
Currently, there does not appear to be an officially generated version of the Blender bpy module. Based on a search of pypi.org it appears that some versions have been uploaded, but it is not clear what their release cadence is or what build features have been enabled (and many do not appear to be actively maintained). Creating a stable automation to build several common use case versions of bpy and upload them to pypi.org would make developing applications that rely on Blender’s powerful tools much more straightforward.

Proposal:

  • Create a terraform config (not sure what the correct terminology is) to build/destroy a Linode VM that will be used to build the bpy module.
  • Create a docker image with the appropriate build environment for Blender/bpy.
  • Create a project (possibly a separate repo) with config for packaging the generated bpy module (would prefer to use poetry since that is what I use on the daily, but I think that only supports pure Python packages).
  • Create appropriate automation to:
    • Stand-up the VM.
    • Run docker and update the container using pyinfra (e.g. to get the latest code for a nightly build).
    • Build the bpy module.
    • Package and upload to pypi.
    • Destroy the VM.

Technologies


  • Docker
  • Terraform
  • Linode
  • pyinfra
  • Python

I work a lot with Python and pyinfra, however, both docker and terraform are new to me (and something I have been meaning to learn for a while now).

Links


TODO

2021-12-01:

  • Getting work environment setup (new laptop).
  • Cloning down Blender’s source code and re-familiarizing myself with the process of building Blender/bpy from source.
  • Create Linode account.
  • Start to go over documentation/tutorials for Linode x Terraform.

2021-12-02:

  • Continue with Linode x Terraform tutorials.