Skip to content

Devising a release process for packages with native extension modules #57

@davesque

Description

@davesque

I'm trying to figure some things out about automating the release process for the blake2b project as well as for any project we have in the future which includes a native extension module for which wheels need to be built.

Here's a bit of background. The release process for packages with pre-compiled extension modules is a bit complex. You need to build a source distribution (*.tar.gz), which can done on any platform and can be used to compile the extension from source. But to make things really nice, you also need to create pre-compiled distributions (wheels or *.whl files) for the specific versions of python and specific platforms (windows, linux, etc.) that you support. MacOS wheels need to be built on macOS, linux wheels on linux, windows wheels on windows, etc. I've thought of a couple of approaches to automating this:

  1. Include a collection of Vagrantfiles in your project that define Vagrant VMs for build environments and scripts that execute inside of them. Then the building would all be done locally.
  • Advantages: More generic, more control over process, PyPI creds never leave your machine
  • Disadvantages: More local setup for building and releasing, Vagrant boxes are annoyingly large (e.g. macOS box is ~10GB), maintenance of Vagrant base boxes is complicated
  1. You could build the wheels on CI and have the CI jobs also publish them to PyPI.
  • Advantages: More hands-off, no local setup required
  • Disadvantages: Build process is more coupled with a particular CI platform, PyPI API token needs to live in env var on CI

So what are everyone's thoughts on this? Which one of those two options seems better? Are there any other completely different approaches that I'm not considering?

Updates:

  • Added a note about the size of Vagrant boxes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions