A meta-post on the workshop I held for the Section Leaders of Code in Place 2021 entitled “Wrangling Pythons with Nix for Reproducible Purity”

Background

Much the same as the rationale behind my other presentation meta-posts, that is:

  • I would like to preserve questions
  • I would like to collect the video, slides and other miscellaneous stuff in one location 1
  • It would be nice to have my own thoughts here afterwards

Details

Blurb verbatim from the spreadsheet.

Docker. Virtual Machines. Pipenv. Virtualenv. The struggle to isolate development environments and pin package versions (both system and project) has been a defining feature of modern programming. Python packaging is a nightmare in and of itself, moving from eggs to wheels, collecting system requirements with distutils (PEP 518)… The horror never ends. Indeed every language level packaging system still falls short of collecting system dependencies (MKL, LAPACK etc). This workshop will introduce the Nix ecosystem for working with Python (and system dependencies) in a lightweight, reproducible manner. We shall work through generating pure shells for development, and clean builds for PyPI. We’ll see how to package arbitrary Python code and what level of nix expression language proficiency is required for the same (spoiler: not much!).

Other Content

Anything on this site tagged with Nix or tagged with Python. Also an introduction to nix given by me (and Amrita Goswami) at CarpentryCon2020 is here:

Slides

Thoughts

I gave the workshop twice and it was rather well attended both times. The speaker presentation room in Oh Yay was very enjoyable and improved the interactivity a lot.


  1. One location I am going to be able to keep track of ↩︎