pycon logo

PyCon 2011 Atlanta

March 9th–17th

Log in or Sign Up

Bento, a flexible and pythonic solution for python packaging

log in to bookmark this presentaton

Experienced / Poster
Bento is a packaging solution for your python code, with a strong focus on extensibility, reliability and integration with the target OS. It aims at being easier for simple packages and more flexible for complex ones. Although still in design phase, bento can already build complex packages like numpy, and do so more reliably and with less code than the current upstream solution.


There has been an increasing number of solutions for easy distribution of python-based softwares: setuptools, distribute, etc... Those solutions work well for a significant part of the python community, but they are python-specific and are generally hard to extend/customize.

I will present bento ('lunch box' in Japanese), which is born out of the inadequacy of current solutions for the scipy community, but is in no way specific to scipy. Instead of offering a fully integrated solution to packaging, bento separates the concerns of configuration, build, installation and packaging. With bento, packages are described in one or multiple static metadata file(s), which is used to drive bentomaker, a command line interface around bento libraries.

The poster will present a few core features of bento:

  • Package description format
  • How to include and install arbitrary data (documentation, configuration files, init scripts, icons, etc...) in a flexible manner.
  • Automatic conversion of packages to bento format
  • Build customization through hooks
  • Some examples of simple and not so simple converted packages (twisted, numpy, scipy)
  • How to use bento in your package without adding dependencies